Timeline for RGB to hex and hex to RGB
Current License: CC BY-SA 4.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 22, 2023 at 14:58 | comment | added | Walter Stabosz |
This solution is nice and short, but it doesn't work with named HTML colors. toRGB('red'); // returns 'red' . The following answer is also 3 lines of code, but uses a property of the Canvas element instead of the Option element: stackoverflow.com/a/47355187/740639
|
|
Oct 16, 2023 at 3:34 | history | edited | Edric | CC BY-SA 4.0 |
Fix weird-looking code snippet
|
Dec 24, 2022 at 8:02 | comment | added | Shanon Jackson | No because it taps into the fact that browsers convert all colors to RGB always | |
Dec 14, 2022 at 8:05 | comment | added | Patryk Janik | Will it work with server-side rendering? | |
Dec 2, 2022 at 22:27 | history | answered | Shanon Jackson | CC BY-SA 4.0 |