Browse Source

渲染测式 开发

master
yuanjiajia 1 year ago
parent
commit
6e005f2f32
  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) ** (1/2.2);
$g = hexdec(substr($hexColor, 3, 2))/255 ** (1/2.2);
$b = hexdec(substr($hexColor, 5, 2))/255 ** (1/2.2);
$r = (hexdec(substr($hexColor, 1, 2))/256) ** 2.2;
$g = (hexdec(substr($hexColor, 3, 2))/256) ** 2.2;
$b = (hexdec(substr($hexColor, 5, 2))/256) ** 2.2;
$floatColor = "$r $g $b";
return $floatColor;
}

Loading…
Cancel
Save