css set color of non-transparent part of element code example Example: background having opacity and text above to not have opacity background-color: rgba(255,0,0,0.6);