Browse Source

渲染测式 开发

master
yuanjiajia 1 year ago
parent
commit
fcfae47657
  1. 6
      src/utils/MatHelper.php

6
src/utils/MatHelper.php

@ -230,9 +230,9 @@ class MatHelper{
static function hex2floatColor($hexColor){
$floatColor = '';
$hexColor = trim($hexColor);
$r = hexdec(substr($hexColor, 1, 2))/255;
$g = hexdec(substr($hexColor, 3, 2))/255;
$b = hexdec(substr($hexColor, 5, 2))/255;
$r = (hexdec(substr($hexColor, 1, 2))/255) ** (1/2.2);
$g = hexdec(substr($hexColor, 3, 2))/255 ** (1/2.2);
$b = hexdec(substr($hexColor, 5, 2))/255 ** (1/2.2);
$floatColor = "$r $g $b";
return $floatColor;
}

Loading…
Cancel
Save