Add the same color of the background to the paragraph and then invert with CSS:
div {
background-color: #f00;
}
p {
color: #f00;
-webkit-filter: invert(100%);
filter: invert(100%);
}
<div>
<p>inverted color</p>
</div>
More Related Contents:
- How to change the color of an svg element?
- How to set Bullet colors in UL/LI html lists via CSS without using any images or span tags [duplicate]
- How do I apply opacity to a CSS color variable?
- How can I define colors as variables in CSS?
- CSS hexadecimal RGBA?
- Convert 8-digit hex colors to rgba colors?
- Chrome renders colours differently from Safari and Firefox
- div background color, to change onhover
- How can I change the color of an ‘svg’ element?
- Are there any good reasons for using hex over decimal for RGB colour values in CSS?
- Are there any cons to using color names in place of color codes in CSS?
- How does hexadecimal color work?
- Is there any clean CSS method to make each letter in a word a different color?
- What is the difference between display: inline and display: inline-block?
- CSS selector based on element text? [duplicate]
- CSS @font-face not working with Firefox, but working with Chrome and IE
- Opacity of background-color, but not the text [duplicate]
- Formatting numbers (decimal places, thousands separators, localization, etc) with CSS
- How to increase the gap between text and underlining in CSS
- Change the order of col-*-12 columns in Bootstrap using push/pull
- Expand div from the middle instead of just top and left using CSS
- Defining Variable Variables using LESS CSS
- How can I zoom an HTML element in Firefox and Opera?
- How to remove outline border from input button
- Angular 2: How to style host element of the component?
- Bootstrap: Position of dropdown menu relative to navbar item
- How do you debug printable CSS?
- Is it acceptable to use tables for forms? Or is it still more correct to use divs?
- How to use variable in CSS? [duplicate]
- Latest on CSS parent selector [duplicate]