Transforming, manipulating, and applying artistic effects to images is already a cinch with imgix’s parameters, but we’ve gone even further to simplify your work: now you can use color keywords directly in your imgix URLs. If you’re tired of looking up the corresponding hex codes for individual colors, or if you’ve been secretly hoping for a more intuitive process, you’re in luck. For all imgix parameters that accept hexadecimal color values, you can now use the names of the actual colors. The list of color keywords we accept is the same as the CSS named colors.
By way of example, our
fill-color parameter, which specifies the color applied to the excess space of a resized image, previously required defining a hexidecimal color value (such as
FFA500). Now, we can simply use a color keyword (like
orange) to specify the background color we want.
Here’s another example. To create the following image, we can use the color keywords
orangered to specify colors for the
mono parameter (which applies a monochrome effect to an image) and the
txtclr parameter (which defines the color of the text overlay). In other words, we can just use
?mono=lightsteelblue&txtclr=orangered in the URL string to create this image:
Here is a list of the imgix parameters that now support the use of color keywords:
We hope this range of tools, paired with the accessibility of color keywords, will place new artistic possibilities at your fingertips.
Questions about color keywords? Ideas for other ways we can streamline your work? Let us know at email@example.com.