Timeline for Getting contrast color to a given color in RGB or ARGB or HEX
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 7, 2019 at 4:16 | history | edited | user1118321 | CC BY-SA 4.0 |
Added simplified code with explanation.
|
Feb 5, 2019 at 15:56 | vote | accept | Strader | ||
Feb 5, 2019 at 15:56 | comment | added | Strader | Found it to be better way to manually lower the alpha of background color for better contrast and calculate inverted one using full alpha | |
Feb 5, 2019 at 11:30 | comment | added | Simon F | "component = 0x80 ^ component;" should do the trick more succinctly, with a trivial extension to all three components in parallel via 0x808080. | |
Feb 5, 2019 at 6:47 | comment | added | user1118321 | @Strader I don't understand what mean. The difference is a constant 128. | |
Feb 4, 2019 at 15:34 | comment | added | Strader | This is a great way, but as i get closer to 127 in R or G or B values, lower is the difference between colors | |
Feb 3, 2019 at 1:54 | history | answered | user1118321 | CC BY-SA 4.0 |