Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Quantization of an RGB color code into a palette

By Federico Iori, 2012/11/14

We have a table DIM_ESHOP_PHONE, containing a column Color_RGB in RGB Hex Format . We want to reduce the color to a given palette of colors, contained into the table DIM_COLOR . We simply associate the RGB code to the palette using the minimal cartesian 3d distance  , defined as

POWER( Power((R-Ro),2)+Power((G-Go),2)+Power((B-Bo),2) , 0.5) .

It works.

Total article views: 391 | Views in the last 30 days: 8
 
Related Articles
BLOG

Color E-Ink

I love my Kindle, but it uses an older e-ink technology that's a little slow and doesn't support col...

FORUM

color parameter

How to creat a color parameter

ARTICLE

Smelly Power

Power is a limited resource, but one that's required for computing. Microsoft has a new idea for gen...

BLOG

Alternating Group Colors and Alternating Row Colors

Alternating Group Colors and Alternating Row Colors After posting my recent blog about Alternating ...

FORUM

Bug in POWER function?

POWER function and BIGINT

Tags
approximation    
color palette    
quantization    
rgb code    
 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones