mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
Color.pm: add error message
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@11097 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
42c377ce85
commit
f0c5ae06bc
@ -120,7 +120,7 @@ BrightnessToChannels($) {
|
||||
|
||||
# COLOR SPACE: HSV & RGB(dec)
|
||||
# HSV > h=float(0, 1), s=float(0, 1), v=float(0, 1)
|
||||
# RGB > r=int(0, 255), g=int(0, 255), b=int(0, 255)
|
||||
# RGB > r=float(0, 1), g=float(0, 1), b=float(0, 1)
|
||||
#
|
||||
|
||||
sub
|
||||
@ -128,6 +128,8 @@ rgb2hsv($$$) {
|
||||
my( $r, $g, $b ) = @_;
|
||||
my( $h, $s, $v );
|
||||
|
||||
main::Log3 undef, 1, "Color::rgb2hsv value our of range [$r,$g,$b]. must be in 0..1." if( $r > 1 || $g > 1 || $b > 1 );
|
||||
|
||||
my $M = ::maxNum( $r, $g, $b );
|
||||
my $m = ::minNum( $r, $g, $b );
|
||||
my $c = $M - $m;
|
||||
|
Loading…
x
Reference in New Issue
Block a user