Converting Colors

Posts related to the Converting Colors Website (https://convertingcolors.com).

Share on Twitter Share on Facebook

April 26, 2021

How to Convert multiple RGB values to HSL with this REST API

In this how-to, I show you how to convert multiple color values from one format into another by using the Converting Colors REST Api, which I provide on RapidAPI.

Read

April 25, 2021

How to Convert HEX to RGB with Javascript

In this how-to, we will learn how to convert a HEX color string like "1502BE" to the RGB Version "21, 2, 190".

Read

April 25, 2021

How to Convert RGB to HEX with PHP

To convert an RGB string like "rgb(114, 193, 44)" to HEX we first need to get the three color values for red, green and blue out of the string, in this article we only talk about RGB strings with the integer value representation, the below sample will not work for three percentage values.

Read

April 25, 2021

How to Get Random Colors

For a random RGB color, we would need three numbers between 0 - 255, and for a color, in the HSL format, we need one number between 0 - 360 and two numbers between 0 - 100. If we want a random HEX color, we would need a number between 0 - 16777215, which we then convert from decimal to hexadecimal.

Read

April 25, 2021

How to Extract dominant Colors from an Image

I show you how to extract the dominant colors from an image with the help of ImageMagick. I use ImageMagick version 7.0.9, which you can download from imagemagick.org.

Read

April 25, 2021

How to Convert HEX to RGB with PHP

To convert a HEX string like "#77CCAA" or "#7ca" to the RGB Version "rgb(119, 204, 170)" we first need to remove the "#" from the string. After this we need to handle the two different cases, standard and shorthand.

Read