Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-color] 12-bit Hex Notation #5344

Closed
Crissov opened this issue Jul 21, 2020 · 2 comments
Closed

[css-color] 12-bit Hex Notation #5344

Crissov opened this issue Jul 21, 2020 · 2 comments

Comments

@Crissov
Copy link
Contributor

Crissov commented Jul 21, 2020

I donʼt like hexadecimal triplet (or quartet) notation for RGB(A) color values, because I think it is

  • firstly too opaque, in that for many people the hex in the tech slang term “hexcode” understandably resonates with magic spell,
  • and secondly too technology-specific, in that RGB becomes constrained to 8-bit sRGB.

However, it remains immensely popular, so take the following as an advocatus diaboli proposal.

It has not been brought up as a part of #3249, but since each hexadecimal digit represents a nibble, i.e. 4 bits, a logical extension to

  • #rgb (3 hexdigits, 4-bit channel or component, 12-bit color),
  • #rgba (4, 4, 16),
  • #rrggbb (6, 8, 24) and
  • #rrggbbaa (8, 8, 32)

notations would be

  • #rrrgggbbb (9, 12, 36) and
  • #rrrgggbbbaaa (12, 12, 48).

10-bit color channels cannot be represented well this way.

Although #rgb can simply map unto #rrggbb or #rrrgggbbb by repeating the digit, this is not possible in general for mapping #rrggbb unto #rrrgggbbb.

@fantasai fantasai added the css-color-5 Color modification label Jul 23, 2020
@zamadatix
Copy link

and secondly too technology-specific, in that RGB becomes constrained to 8-bit sRGB.

10-bit color channels cannot be represented well this way.

The proposal doesn't seem to provide any practical gain towards the problem statement.

@svgeesus
Copy link
Contributor

I donʼt like hexadecimal triplet (or quartet) notation for RGB(A) color values

or do I, which is why all the modern stuff is tending towards a bit-depth neutral formulation with a float [0 .. 1] or 0% to 100% representation

Adding convoluted hexadecimal representations merely obscures this goal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants