Last active
November 27, 2015 13:39
-
-
Save RyanNutt/204fece9b7b932d0f1a6 to your computer and use it in GitHub Desktop.
PHP script to return the hex codes of the 216 "web safe" colors
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
<?php | |
function web_safe_colors() { | |
$ray = array(); | |
$steps = array( | |
'00', | |
'33', | |
'66', | |
'99', | |
'cc', | |
'ff' ); | |
foreach ( $steps as $r ) { | |
foreach ( $steps as $g ) { | |
foreach ( $steps as $b ) { | |
$ray[] = $r . $g . $b; | |
} | |
} | |
} | |
return $ray; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment