Check if the font color used in the color scheme is dark.
556249
def is_dark_font_color(color_scheme):
    """"""
    color_scheme = get_color_scheme(color_scheme)
    font_color, fon_fw, fon_fs = color_scheme['normal']
    return dark_color(font_color)
315213
def palette_font_and_background_color_toggled(self, settings, key, user_data):
        
        self.settings.styleFont.triggerOnChangedValue(self.settings.styleFont, 'palette')
1329023
function getDebugNamespaceColor (namespace) {
  var type = getDebugNamespaceType(namespace);

  var color = settings.colors && settings.colors[type];

  return color || null;
}
609119
function ( color, errorMsg ) {
            color = this.KEYWORDS[color.toLowerCase()];
            if ( color ) {
                return color;
            } else {
                if ( errorMsg ) warning( errorMsg );
                return undefined;
            }
        }
1111907
public int match(FontSpec font)
    {
        if (this.family.equalsIgnoreCase(font.family))
        {
            int ret = 100;
            
            if (this.weight == null)
                ret++;
            else if  (representsBold(this.weight) == representsBold(font.weight))
                ret += 10;
            
            if (this.style == null)
                ret++;
            else if (this.style == font.style)
                ret += 10;
            
            return ret;
        }
        else
            return 0;
    }
301522
function isBoldBroken() {
    var el = document.createElement('span');
    el.innerHTML = 'hello world';
    document.body.appendChild(el);
    var w1 = el.scrollWidth;
    el.style.fontWeight = 'bold';
    var w2 = el.scrollWidth;
    document.body.removeChild(el);
    return w1 !== w2;
}
494143
def com_google_fonts_check_whitespace_widths(ttFont):
  """"""
  from fontbakery.utils import get_glyph_name

  space_name = get_glyph_name(ttFont, 0x0020)
  nbsp_name = get_glyph_name(ttFont, 0x00A0)

  space_width = ttFont['hmtx'][space_name][0]
  nbsp_width = ttFont['hmtx'][nbsp_name][0]

  if space_width > 0 and space_width == nbsp_width:
    yield PASS, "Whitespace and non-breaking space have the same width."
  else:
    yield FAIL, ("Whitespace and non-breaking space have differing width:"
                 " Whitespace ({}) is {} font units wide, non-breaking space"
                 " ({}) is {} font units wide. Both should be positive and the"
                 " same.").format(space_name, space_width, nbsp_name,
                                  nbsp_width)
349351
def bk_black(cls):
        ""
        wAttributes = cls._get_text_attributes()
        wAttributes &= ~win32.BACKGROUND_MASK
        #wAttributes |= win32.BACKGROUND_BLACK
        cls._set_text_attributes(wAttributes)
683317
public static boolean isDarkTheme(Context context, boolean current) {
        return resolveBoolean(context, R.attr.mdtp_theme_dark, current);
    }
934272
public void setFontColor(org.kie.dmn.model.api.dmndi.Color value) {
        this.fontColor = value;
    }
994139
function isDark (r, g, b) {
  /**
   * W3C perceived brightness calculator
   * @see {@link https://www.w3.org/TR/AERT/#color-contrast}
   */
  const brightness = ((r * 299) + (g * 587) + (b * 114)) / 1000

  if (brightness < 140) {
    return true
  }

  return false
}
485834
function toMaterialStyle(text, shade = 500) {
  let shadeStr = `${shade}`; // convert shade to string
  if (!availableShades.includes(shadeStr)) {
    shadeStr = '500';
  }

  const colorObj = getColorObj(text);

  return {
    backgroundColor: colorObj.shades[shadeStr],
    color: parseInt(shadeStr, 10) >= colorObj.whiteBreakpoint ? materialWhite : materialBlack,
    materialColorName: colorObj.name
  };
}
1097073
def dark(cls):
        ""
        wAttributes = cls._get_text_attributes()
        wAttributes &= ~win32.FOREGROUND_INTENSITY
        cls._set_text_attributes(wAttributes)
537399
def have_font(font_name):
    
    if font_name in font_dir:
        return True

    # try it as an alias
    font_name = resolve_alias(font_name, font_name)
    return font_name in font_dir
990371
public boolean isStandardFont() {
		return (family == UNDEFINED && size == UNDEFINED && style == UNDEFINED
				&& color == null && baseFont == null);
	}
324845
function measureTextHeight(font) {
       return font.fontData.capHeight * font.lineHeight * font.fontScale.y;
     }
946624
function highlight(node, ok) {
        if (!node) return;
        if (self.options.markParen) {
          self.options.markParen(node, ok);
        }
        else {
          node.style.fontWeight = "bold";
          node.style.color = ok ? "#8F8" : "#F88";
        }
      }