Files
web-site/Internal/package-image/ColorConverter.php
T
2026-07-01 16:44:17 +03:00

30 lines
607 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php namespace ZN\Image;
/**
* ZN PHP Web Framework
*
* "Simplicity is the ultimate sophistication." ~ Da Vinci
*
* @package ZN
* @license MIT [http://opensource.org/licenses/MIT]
* @author Ozan UYKUN [ozan@znframework.com]
*/
class ColorConverter
{
public static function run($rgb)
{
// Renkler küçük isimlerle yazılmıştır.
$rgb = strtolower($rgb);
$colors = Properties::$colors;
if( isset($colors[$rgb]) )
{
return $colors[$rgb];
}
else
{
return $rgb ?? '0|0|0|127';
}
}
}