Variable for theme text color

I have a custom web part that I want to have styled correctly no matter what color theme is installed on the site. I have this working correctly for my button background colors like this:

.myButtons {     background-color: $  ms-color-themePrimary; }  .myButtons:hover {     background-color: $  ms-color-themeDarkAlt; } 

My problem is that I need to know what foreground color to use. The stock web parts, for example, will change the foreground color to black or white depending on what color theme is selected and I’d like my web part to do the same so that users aren’t forced to try to read white text on a yellow background or something.

Is there a variable to get the correct text color?

Highlight Color & Text Color

How do we avoid using the same highlight color as the text color?

For example: when you highlight a paragraph, the background color changes to draw attention to the paragraph, but what if the color of the paragraph is the same as the background color?

How could we avoid that? Can you guys give me some keywords?

Thank you 😀

SharePoint 2013 – Set column color based on list header

I’ve a unique requirement for one of my lists. In order to make it easier to read I’ve used this css code to alternate the color of the columns.

table.ms-listviewtable td:nth-child(even) { background: #D0E4F5;} 

Now this is great for most of the columns . However I’ve some special columns that need to be different colors (like yellow or green). And due to the views and some other javascript I cannot use something like

table.ms-listviewtable td:nth-last-child(2){ background: lightyellow;} 

Would anyone be able to write some javascript that looks at the column header and then sets the background-color of the column?

So if header contains ‘Total’ color the entire column red.

Thanks

Objects in 3D space: color contrast against background

Is there a tool to help me pick proper colors for:

  1. Objects
  2. Background

in 3D space. Colors should have proper contrast.

UPDATE

A sample of my options for background color is:

Background color: #c8c8c8c , object color: #576675

background color = #c8c8c8

Background color: #888888 , object color: #576675

background color = #888888

Background color: #444444 , object color #576675

background color: #444444

Alternate List Row Color in WebPart Content Query

XSL File : Created Custom Template Style

 <xsl:template name="Custom" match="Row[@Style='Custom']" mode="itemstyle">         <xsl:variable name="SafeLinkUrl">             <xsl:call-template name="OuterTemplate.GetSafeLink">                 <xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>             </xsl:call-template>         </xsl:variable>         <xsl:variable name="DisplayTitle">             <xsl:call-template name="OuterTemplate.GetTitle">                 <xsl:with-param name="Title" select="@Title"/>                 <xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>             </xsl:call-template>         </xsl:variable>       <div class="mydiv">         <xsl:call-template name="OuterTemplate.CallPresenceStatusIconTemplate"/>         <a href="{$  SafeLinkUrl}" title="{@LinkToolTip}">           <xsl:if test="$  ItemsHaveStreams = 'True'">             <xsl:attribute name="onclick">               <xsl:value-of select="@OnClickForWebRendering"/>             </xsl:attribute>           </xsl:if>           <xsl:if test="$  ItemsHaveStreams != 'True' and @OpenInNewWindow = 'True'">             <xsl:attribute name="onclick">               <xsl:value-of disable-output-escaping="yes" select="$  OnClickTargetAttribute"/>             </xsl:attribute>           </xsl:if>           <xsl:value-of select="$  DisplayTitle"/>         </a>       </div>       </xsl:template> 

I have a aspx page which has list which is added using WebPart Content Query, and the list row should have alternate Color..

I have tried:

<style>       div.mydiv li:nth-child(odd){background-color:aqua;}       div.mydiv li:nth-child(even){background-color:blue;}       </style> 

But, its not working. Thanks in advance..

Alternate List Row Color in WebPart Content Query

XSL File : Created Custom Template Style

 <xsl:template name="Custom" match="Row[@Style='Custom']" mode="itemstyle">         <xsl:variable name="SafeLinkUrl">             <xsl:call-template name="OuterTemplate.GetSafeLink">                 <xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>             </xsl:call-template>         </xsl:variable>         <xsl:variable name="DisplayTitle">             <xsl:call-template name="OuterTemplate.GetTitle">                 <xsl:with-param name="Title" select="@Title"/>                 <xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>             </xsl:call-template>         </xsl:variable>       <div class="mydiv">         <xsl:call-template name="OuterTemplate.CallPresenceStatusIconTemplate"/>         <a href="{$  SafeLinkUrl}" title="{@LinkToolTip}">           <xsl:if test="$  ItemsHaveStreams = 'True'">             <xsl:attribute name="onclick">               <xsl:value-of select="@OnClickForWebRendering"/>             </xsl:attribute>           </xsl:if>           <xsl:if test="$  ItemsHaveStreams != 'True' and @OpenInNewWindow = 'True'">             <xsl:attribute name="onclick">               <xsl:value-of disable-output-escaping="yes" select="$  OnClickTargetAttribute"/>             </xsl:attribute>           </xsl:if>           <xsl:value-of select="$  DisplayTitle"/>         </a>       </div>       </xsl:template> 

I have a aspx page which has list which is added using WebPart Content Query, and the list row should have alternate Color..

I have tried:

<style>       div.mydiv li:nth-child(odd){background-color:aqua;}       div.mydiv li:nth-child(even){background-color:blue;}       </style> 

But, its not working. Thanks in advance..

White Buck can turn into any color buck!

Hi all,

No, this is not a racist topic.

Yes, I am here to meet great people who want to make money on the Internet.

I work full time as a researcher and want to create a new source of income.

I can write an article on almost any topic, as long as I can do my research online.

I am looking for partners who want to sell my articles and earn commissions. It can go up to 100% commission because my rates are great for both parties.

Let me know, if you want to be my buddy.

Kind regards,…

White Buck can turn into any color buck!

Retrieve background color in ubuntu mate

I am using Ubuntu mate 18.04.3 LTS.

I am quite fond of my background color and would like to use it on another machine. Where can I find the exact color that is used? When I go into the Control center and get the Appearance Preferences window, and then the Background tab, I see my color, but when I click on my background color next to Color: Solid color, I get a color selector that is positioned on a red color, while I want a blue color, so that is not the current one.

Quiz – multiple choice – color answers

I am creating a small quiz app for my friend, which consists of picking multiple options, (S)* means the option is correct, (N)* means incorrect. So far I’ve came up with 3 colors ->

  1. If the answer is CORRECT and is NOT MARKED -> Orange
  2. If the answer is CORRECT and is MARKED -> Green
  3. If the answer is INCORRECT and is MARKED -> Red

I don’t have any previous experience, this is my first GUI project basically, so any advice would be very appreciated

*The questions and options are in Slovak, sorry for that.

Choosing answers

Evaluated answers