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 639323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:49:47+00:00 2026-05-13T20:49:47+00:00

i’m studying getPixel32() and the Bitmap and Bitmap Data classes. Basically, i’d like to

  • 0

i’m studying getPixel32() and the Bitmap and Bitmap Data classes. Basically, i’d like to know how to output a simple trace of an ARGB from a hexadecimal value.

as an aside, i’m under the impression, which i assume/hope is wrong, that hexadecimal values can’t produce as many colors as RGBA values. perhaps “web safe” has thrown me off with understanding the usefulness or desire to use colors produces with hexadecimal values.

  • 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-05-13T20:49:47+00:00Added an answer on May 13, 2026 at 8:49 pm

    To extract the color information you have to work with bitwise operators. Colors are stored like 0xAARRGGBB so you have to extract those parts. The little snippet should do the job:

    var hex: uint = 0x00ff00ff;
    var a: int = (hex >>> 0x18) & 0xff;
    var r: int = (hex >>> 0x10) & 0xff;
    var g: int = (hex >>> 0x08) & 0xff;
    var b: int = hex & 0xff;
    
    trace(a, r, g, b);
    

    Depending on how you specify RGBA values the answer might change. If you use RGBA values where each channel is specified by one byte, you can express exactly as much colors as in a hex value. Your “hex value” is an unsigned integer consisting of 4 bytes. In Flash there is also the Number type which consitsts of 64-bit so each channel would be expressed a 8-bytes instead of one. You can imagine that you have much more precision. However, probably your screen is set to “True Color (32-bit)” and will not be able to show that many colors. You go even beyond double-precision (64bit) and use decimal precision, which is mostly used for financial calculations. Each value consists of 128-bit which makes 16 bytes for each channel. That is 16 times more then when using your hex representation. Of course that is much more precision but your monitor will not be able to handle it.

    A side note. Your image size is also widthheightchannels*(bytes per channel). So if you use one byte per channel which is 8-bit you get already enough colors. For a big image the difference is quite big if you go from 8-bit to 32-bit per channel.

    A 1024×768 image with 8-bit precision is 3072kb whereas the same 32-bit image is 12288kb in memory. That same image would take up 24576kb using Flash’s Number type. So you are probably better of staying with 8-bit precision which should be enough in most cases.

    I hope that helps and you have a better understanding now of images and their structure.

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

Sidebar

Ask A Question

Stats

  • Questions 352k
  • Answers 352k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer There's the each method. @some_value['Meta'].each do |k, v| puts v… May 14, 2026 at 7:25 am
  • Editorial Team
    Editorial Team added an answer You can buffer the output of the footer, then generate… May 14, 2026 at 7:25 am
  • Editorial Team
    Editorial Team added an answer If the masksToBounds property is set to YES, any sublayers… May 14, 2026 at 7:25 am

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I want use html5's new tag to play a wav file (currently only supported
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I've got a string that has curly quotes in it. I'd like to replace
In order to apply a triggered animation to all ToolTip s in my app,

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.