User:Tpatru/vector.css

// Black background is a special case. It's fairly likely to occur and   // the default color shift we do isn't very noticeable with very dark colors. if (backColor.r < 0x20 && backColor.g < 0x20 && backColor.b < 0x20)  {           textColor.r = backColor.r + 0x20;           textColor.g = backColor.g + 0x20;           textColor.b = backColor.b + 0x20;   }   else   {           textColor.r = backColor.r + ((backColor.r < 128) ? 0x10 : -0x10);           textColor.g = backColor.g + ((backColor.g < 128) ? 0x10 : -0x10);           textColor.b = backColor.b + ((backColor.b < 128) ? 0x10 : -0x10);   }