-
Notifications
You must be signed in to change notification settings - Fork 0
codeToHex
Corey Avis edited this page Sep 23, 2026
·
2 revisions
Part of the custom CoreyPHP color code utility system used to dynamically render and style generated files. Converts a single CoreyPHP color code character into a 6-digit hex color string, prefixed with #.
codeToHex(string|int $colorCode): string
colorCode (string|integer)
: A case-insensitive single character (a-z, 0-9).
- See the internal mapping rules: CoreyPHP Color Code Utility System Documentation
(string)
: Returns a lowercase, 7-character CSS-compatible hex value (e.g., "#ffff00").
$cphp->codeToHex('y') = #ffff00 (yellow)
- No debug errors.
codeToColor | codeToRgb | colorToCode
Home | CoreyPHP | Color Code