mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	tools/hex: print mean #rrggbb value
This commit is contained in:
		
							parent
							
								
									83331e57ed
								
							
						
					
					
						commit
						9d408aad73
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
					@ -54,5 +54,9 @@ int main(int argc, char **argv)
 | 
				
			||||||
	       (col[0] + col[3]) / 2.0,
 | 
						       (col[0] + col[3]) / 2.0,
 | 
				
			||||||
	       (col[1] + col[4]) / 2.0,
 | 
						       (col[1] + col[4]) / 2.0,
 | 
				
			||||||
	       (col[2] + col[5]) / 2.0);
 | 
						       (col[2] + col[5]) / 2.0);
 | 
				
			||||||
 | 
						printf("[ mean ] #%x%x%x\n",
 | 
				
			||||||
 | 
						       (int)((col[0] + col[3]) / 2.0 * 255),
 | 
				
			||||||
 | 
						       (int)((col[1] + col[4]) / 2.0 * 255),
 | 
				
			||||||
 | 
						       (int)((col[2] + col[5]) / 2.0 * 255));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue