Last active
June 3, 2022 08:07
-
-
Save Flicksie/26816ba856a611230f2fb607b21b8536 to your computer and use it in GitHub Desktop.
List of pure colors supported by the Sega Mega Drive
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
const colors = []; | |
const steps = [ 0, 0x34, 0x57, 0x74, 0x90, 0xAC, 0xCE, 0xFF ]; | |
for (color = 0; color <= 0777; color++){ | |
colors.push( '#' + | |
color | |
.toString(8) | |
.padStart(3,'0') | |
.split('') | |
.map( c => steps[c].toString(16).padStart(2,'0') ) | |
.join('') | |
); | |
} | |
colors; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment