forked from mirrors/qmk_userspace
		
	Fixing hsv_to_rgb where s = 0 and v < 255 (#5915)
* Fixing hsv to rgb where s is 0 and v is < 255 * Update color.c
This commit is contained in:
		
					parent
					
						
							
								0099bbf9a6
							
						
					
				
			
			
				commit
				
					
						f11fde9bf5
					
				
			
		
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -27,9 +27,13 @@ RGB hsv_to_rgb( HSV hsv )
 | 
			
		|||
 | 
			
		||||
	if ( hsv.s == 0 )
 | 
			
		||||
	{
 | 
			
		||||
#ifdef USE_CIE1931_CURVE
 | 
			
		||||
		rgb.r = rgb.g = rgb.b = pgm_read_byte( &CIE1931_CURVE[hsv.v] );
 | 
			
		||||
#else
 | 
			
		||||
		rgb.r = hsv.v;
 | 
			
		||||
		rgb.g = hsv.v;
 | 
			
		||||
		rgb.b = hsv.v;
 | 
			
		||||
#endif
 | 
			
		||||
		return rgb;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue