burger menu icon
WillMaster

WillMaster > Blog > JavaScript

FREE! Coding tips, tricks, and treasures.

Possibilities weekly ezine

Get the weekly email website developers read:

 

Your email address

name@example.com
YES! Send Possibilities every week!

Image Sepia Soak

When an image seems too cold or harsh, soak a bit of sepia into it for some warmth. Sepia is a yellow/brown color, with a hint of red.

I enjoy working with images. Which is a funny thing to say for someone who is colorblind, huh? I'm only certain-colors colorblind.

In this article, I'll show you how to use CSS to imbue the color sepia into images.

Use filter:sepia(0); for zero amount of sepia in the image and filter:sepia(1); for an image entirely in shades of sepia.

For an amount of sepia between the two extremes, specify a decimal number between 0 and 1 or a percentage between 0 and 100. filter:sepia(65%); imbues 65% sepia into the colors. As does filter:sepia(0.65);.

Demonstrations of filter:sepia() for 0, 0.65, and 1 values.

beach ball beach ball beach ball

Here is the source code for the above demonstrations.

<img style="filter:sepia(0); max-width:100%;" src="https://www.willmaster.com/possibilities/images/poss20161027_Multicolorbeachball.png" style="filter:sepia(0); max-width:100%;" alt="beach ball">
<img style="filter:sepia(0.65); max-width:100%;" src="https://www.willmaster.com/possibilities/images/poss20161027_Multicolorbeachball.png" alt="beach ball">
<img style="filter:sepia(1); max-width:100%;" src="https://www.willmaster.com/possibilities/images/poss20161027_Multicolorbeachball.png" alt="beach ball">

To add a bit of warmth, test with various amounts of the filter:sepia() value. As you see with the demonstration values, it can make quite a bit of difference.

(This content first appeared in Possibilities newsletter.)

Will Bontrager

Was this blog post helpful to you?
(anonymous form)

Support This Website

Some of our support is from people like you who see the value of all that's offered for FREE at this website.

"Yes, let me contribute."

Amount (USD):

Tap to Choose
Contribution
Method


All information in WillMaster Blog articles is presented AS-IS.

We only suggest and recommend what we believe is of value. As remuneration for the time and research involved to provide quality links, we generally use affiliate links when we can. Whenever we link to something not our own, you should assume they are affiliate links or that we benefit in some way.

Recent Articles in the Library

Access-Restricted Page

Make a restricted-access page with logging.

Image Swap

Swap a series of images in and out of an IMG tag.

No-Menu Page Printing

Site visitors may print your web page without printing the menus.

JavaScript-Formatted Date and Time

A JavaScript function to publish date/time according to your custom format.

Friendly Anchor Link

How to insert a bit of space above a normal anchor link scroll position.

Form Field Prefill With a Tap

When a link is tapped, a form field is filled in.

Beacon

Send a beacon to your script. Optionally, also send information.

How Can We Help You? balloons
How Can We Help You?
bullet Custom Programming
bullet Ready-Made Software
bullet Technical Support
bullet Possibilities Newsletter
bullet Website "How-To" Info
bullet Useful Information List

© 1998-2001 William and Mari Bontrager
© 2001-2011 Bontrager Connection, LLC
© 2011-2026 Will Bontrager Software LLC