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

  • Home
  • SEARCH
  • 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 8902323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:35:02+00:00 2026-06-15T01:35:02+00:00

In RGB model, each pixel is defined by 3 bytes, for R,G and B

  • 0

In RGB model, each pixel is defined by 3 bytes, for R,G and B respectively. This gives a total of 224 colors, including 256 tones of grey.

It is very common to represent HSV/HSB/HSL models with floats (not bytes). Most descriptions describe hue as the "angle" in a cone, so it’s sensible to treat it as a real number.

But how does this relate to the down-to-earth limit of 224 total colors..? How many distinct hues are available? More over, it seems to me that the number should depend on other parameters – saturation for instance..


Interesting reading: https://web.archive.org/web/20170622125306/http://www.dig.cs.gc.cuny.edu/manuals/Gimp2/Grokking-the-GIMP-v1.0/node52.html

  • 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-15T01:35:03+00:00Added an answer on June 15, 2026 at 1:35 am

    In HSV, the hue is defined as

    H = atan2( sqrt(3)*(G-B), 2R-G-B )
    

    (link). In each of the six sectors (R-Y, Y-G …), there are equally many hues. Additionally, there are six hues at the boundary between the regions. So, 6 + 6 * huesRY.

    In the red-yellow sector, R > G > B, so both arguments to atan2 are positive.

     count sqrt(3) * (G-B) / (2R-G-B)
    =count (G-B) / (2R-G-B)
    =count (G-B) / ((G-B) + (2R-2G))
    

    since we can apply any linear transformation to the sets of [x,y] and not change the count of its ratios, x / (x+2y) == x / y

    =count (G-B) / (R-G)
    

    if we subtract the same value from all R,G,B, the ratio does not change, so assume B=0

    =count G / (R-G)
    =count G / R
    

    so, there are six times as many hues as there are ratios between two positive integers that are both below 2^8 (assuming 8 bits per channel), and six more. There are as many ratios as there are pairs of coprime positive integers. The number of positive integers below n that are coprime with n is called the Euler’s totient function. OEIS lists its partial sums. There are exactly 19948 pairs of coprime positive integers below 256.

    6 * 19948 + 6 = 119 694

    There are exactly 119 694 different hues in the HSV model that correspond to a color in the 8-bit RGB model. Note that they are not spaced evenly.

    If 8 bits per channel are used in the HSV model, then there are less colors than in the RGB model with 8 bits per channel simply because some HSV triples map to the same color while every RGB triple defines a different color.

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

Sidebar

Related Questions

I have this gnuplot script reset set palette model RGB defined (0 gray, 0.1
I found this RGB to HSL script over at http://www.mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript . I can't find
Given that in RGB we can represent 256^3 combinations = 16,777,216 colors, and since
I have RGB for setting colour of my label it is like this R-:0
Is it possible to get the RGB color of a pixel using PIL? I'm
How I can Read the RGB-Pixel by Pixel values from CGImagea also after how
I have a list of div's. This is one div structure: <div class=commentWrap id=@Model.CommentId>
We have a database-table where we manage a range of colors. In this table
I'm using SlimDX, targeting DirectX 11 with shader model 4. I have a pixel
I'm using Django and have a MySQL database filled with arbitrary RGB colors. The

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.