Skip to content

codeToColor

Corey Avis edited this page Sep 23, 2026 · 2 revisions

codeToColor

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 its English name representation.

Usage

codeToColor(string|int $colorCode): string

Parameters

colorCode (string|integer) : A case-insensitive single character (a-z, 0-9).

Color Code

Return Value

(string) : Returns the lowercase common name of the color (e.g., "yellow", "blue"). Defaults to "white" if the code is unrecognized.

Examples

$cphp->codeToColor('y') = yellow

Debug Errors

  • No debug errors.

Related Methods

codeToHex | codeToRgb | colorToCode


Home | CoreyPHP | Color Code

Clone this wiki locally