[solved] How Do I Get The Colours That I Want? (1 Viewer)

wizard123

Retired Team Member
  • Premium Supporter
  • January 24, 2012
    2,543
    2,615
    United Kingdom United Kingdom
    Country flag
    With MP 1.16 Pre and the new functions it will work without # and full ARGB ;)
    I am on 1.16pre i was just stating simply without the # it won't work i.e eaeaea or ffeaeaea or 99eaeaea will not work that's all
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    11,750
    6,598
    Kyiv
    Ukraine Ukraine
    Country flag
    Like: https://github.com/MediaPortal/Medi...al.Application/FullScreenSplashScreen.cs#L160
    C#:
    if (xmlNode != null)
    {
      string valueText = xmlNode.Value;
      if (!string.IsNullOrEmpty(valueText))
      {
        bool isNamedColor = false;
    
        if (valueText[0] == '#' && valueText.Length > 1)
        {
          valueText = valueText.Substring(1);
        }
    
        foreach (char ch in valueText)
        {
          if (ch >= '0' && ch <= '9' || ch >= 'A' && ch <= 'F' || ch >= 'a' && ch <= 'f')
          {
            continue;
          }
    
          isNamedColor = true;
          break;
        }
    
        if (!isNamedColor)
        {
          valueText = "#" + valueText;
        }
    
        try
        {
          Color textColor = ColorTranslator.FromHtml(valueText);
          Log.Debug("FullScreenSplash: TextColor value found: {0}", textColor);
          lblMain.ForeColor = textColor;
          lblVersion.ForeColor = textColor;
          lblCVS.ForeColor = textColor;
          Log.Debug("FullScreenSplash: TextColor successfully set: {0}", textColor);
        }
        catch
        {
          Log.Debug("FullScreenSplash: TextColor set failed: {0}", valueText);
        }
      }
    }
    No exception, splash always work and all color support ...
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    11,750
    6,598
    Kyiv
    Ukraine Ukraine
    Country flag
    Can you please explain this in more detail?
    SplashScreen not equal FullSplashScreen and not equal GUIWindow
    FullSplashScreen not equal GUIWindow
    MP Window equal GUIWindow
    MP Window work according to the rules skins engine. Support all controls ...
    FullSplashScreen not work according to the rules skins engine. Support couple controls. Picture and text. Text supports quite a few properties and their values are not such as to control in GUI Window.
    SplashScreen Not adjusted at all.
    That such a leapfrog. :):whistle::coffee:
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    1,976
    1,224
    Southampton
    United Kingdom United Kingdom
    Country flag
    It seems to me that the situation is this: without changing any MP C++ or C# code, there are two choices for "splashscreen.xml":

    (1) Use a notation that is valid everywhere within MP.

    (2) Use a notation that is not valid everywhere within MP.

    For those who have lost track of this discussion, the notation that is valid everywhere within MP means using named colours, such as "lightblue" or "ivory". I would also add an XML comment to the file saying that "Only named colours can be used in this file", to avoid a different set of people having this discussion again five years from now.

    -- from CyberSimian in the UK
     

    catavolt

    Design Group Manager
  • Team MediaPortal
  • August 13, 2007
    12,772
    9,198
    Lanzarote
    Germany Germany
    Country flag
    For those who have lost track of this discussion, the notation that is valid everywhere within MP means using named colours, such as "lightblue" or "ivory". I would also add an XML comment to the file saying that "Only named colours can be used in this file", to avoid a different set of people having this discussion again five years from now.
    First of all you´re a bit wrong ;)
    1. Not only named colours are allowed in all screens (except splashscreen), but also ARGB values ;)
    2. As splashscreen is an exception to all (and also well known by all skinners), there shouldn´t be any need of any comment (because in splashscreen.xml we use #RGB) ;)
    3. The discussion was raised by you only, other skinners were already aware of the things discussed here ;)
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    M HEVC 10 bit washed out colours Codecs, External Players 3
    Similar threads

    Top Bottom