-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve RGB→256-colour palette interpolation by trying gray and cube
The 6×6×6 colour cube includes gray colours. Black and white are already used but the cube also includes other grays such as #5f5f5f or #d7d7d7. For those colours it’s better to use colour from the cube rather than from the grayscale ramp. On the flip side, it is better to approximate #080807 by #080808 present in te grayscale ramp rather than black from the colour cube. Change to code to try both approximation and choose whichever has in smaller distance to the original colour.
- Loading branch information
Showing
1 changed file
with
43 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters