
- CSS Tutorial
- CSS - Home
- CSS - Introduction
- CSS - Syntax
- CSS - Inclusion
- CSS - Measurement Units
- CSS - Colors
- CSS - Backgrounds
- CSS - Fonts
- CSS - Text
- CSS - Images
- CSS - Links
- CSS - Tables
- CSS - Borders
- CSS - Margins
- CSS - Lists
- CSS - Padding
- CSS - Cursors
- CSS - Outlines
- CSS - Dimension
- CSS - Scrollbars
- CSS Advanced
- CSS - Visibility
- CSS - Positioning
- CSS - Layers
- CSS - Pseudo Classes
- CSS - Pseudo Elements
- CSS - @ Rules
- CSS - Text Effects
- CSS - Media Types
- CSS - Paged Media
- CSS - Aural Media
- CSS - Printing
- CSS - Layouts
- CSS - Validations
- CSS3 Tutorial
- CSS3 - Tutorial
- CSS3 - Rounded Corner
- CSS3 - Border Images
- CSS3 - Multi Background
- CSS3 - Color
- CSS3 - Gradients
- CSS3 - Shadow
- CSS3 - Text
- CSS3 - Web font
- CSS3 - 2d transform
- CSS3 - 3d transform
- CSS3 - Animation
- CSS3 - Multi columns
- CSS3 - User Interface
- CSS3 - Box Sizing
- CSS Responsive
- CSS - Responsive Web Design
- CSS References
- CSS - Questions and Answers
- CSS - Quick Guide
- CSS - References
- CSS - Color References
- CSS - Web browser References
- CSS - Web safe fonts
- CSS - Units
- CSS - Animation
- CSS Resources
- CSS - Useful Resources
- CSS - Discussion
Convert the colors of the object to 256 shades of gray with CSS
Use the grayscale effect to convert the colors of the object to 256 shaded of gray. The following parameter is used in this filter:
Parameter | Description |
---|---|
Gray | Converts the colors of the object to 256 shades of gray. |
Example
You can try to run the following code to set grayscale effect:
<html> <head> </head> <body> <img src="/css/images/logo.png" alt="CSS Logo" style="Filter: Gray"> <p>Text Example:</p> <div style="width: 357; height: 50; font-size: 30pt; font-family: Arial Black; color: red; Filter: Gray">CSS Tutorials</div> </body> </html>
- Related Articles
- Map the colors of the object to their opposite values in the color spectrum with CSS
- 8085 program to convert gray to binary
- How to change bullet colors for lists with CSS?
- Define colors using the Hue-Saturation-Lightness model (HSL) with CSS
- Define colors using the Red-Green-Blue model (RGB) with CSS
- 8085 program to convert binary numbers to gray
- Python Program to Convert Gray Code to Binary
- Python Program to Convert Binary to Gray Code
- C++ Program to convert the Binary number to Gray code using recursion
- Define colors using the Red-Green-Blue-Alpha model (RGBA) with CSS
- Define colors using the Hue-Saturation-Lightness-Alpha model (HSLA) with CSS
- How to create a scatterplot with colors of the group of points in R?
- Find the degree of the polynomial: $p^{4}-256$.
- Convert text to lowercase with CSS
- Convert text to uppercase with CSS

Advertisements