Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8112901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T02:39:34+00:00 2026-06-06T02:39:34+00:00

I am parsing a XML file supplied by some software. Part of the parsing

  • 0

I am parsing a XML file supplied by some software. Part of the parsing is extracting colors from some attributes. The problem I have is the color is a 12digit hex value. ie,

<Text AdornmentStyle="0" Background="#FFFFFFFFFFFF" Color="#DD6B08C206A2" Font="Courier Final Draft" RevisionID="0" Size="12" Style="">Test</Text>

As you can see the colors are 12digits long. I need to get the 6 digit color so I can display it correctly on html.

Has anyone come across this before?

Hope you can advise.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T02:39:36+00:00Added an answer on June 6, 2026 at 2:39 am

    Never seen a 12-digit hex color string before. Must be using 2-bytes per channel, which means if you convert it, you’re going to lose a bit of information.

    I believe the color is in the format #RRRRGGGGBBBB, so take each 4 hexgits and divide by (16^4/16^2)=256, and round if necessary. That should do it.

    …and if that doesn’t give you the right color, try CMYK like cypher suggests: #CCCMMMYYYKKK (12-bits per channel).

    e.g., to convert DD6B08C206A2 do:

    0xDD6B / 0x100 = 0xDD
    0x08C2 / 0x100 = 0x08
    0x06A2 / 0x100 = 0x06
    

    Put those back together and you get #DD0806.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem parsing a XML file which contains special characters like ,
I have a problem when parsing xml from the internet. The parser doesn't return
I am parsing xml file from server using xmlParser in Android. When i print
I got a string from parsing a XML file which looks like this: Fri,
I want to use DOM4j for parsing xml file in Java. I have this
I have sample code written for parsing xml file using javax.xml package. it uses
I'm parsing an xml file and I can NSLog the parsing, but my problem
I am parsing xml file from url(in code below), using file_get_contents() function, and simpleXML,
I am parsing xml file from SDcard and display it in textview. whenever i
I have gotten this error in the strings.xml file: error: Error parsing XML: unbound

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.