Results 1 to 9 of 9

Thread: Color Chart or Table for color codes

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Color Chart or Table for color codes

    Can someone point me at a location of where I could find a chart showing which colors match which color codes that are used by VB?

    &H00000000& = Black.

    Preferably the chart has a few more colors than the 48 colors in the color palette.

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Color Chart or Table for color codes

    Open up your Object Browser in the VB IDE (Press F2) and search for vbBlack. The constants will all be listed out with their hex color codes but constant values are easier to work with.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3
    Frenzied Member
    Join Date
    Jun 2006
    Posts
    1,098

    Re: Color Chart or Table for color codes

    If you are familiar with RGB values, and can convert the 0-255 decimal values into two-character hex values, then this may be helpful:
    &H00BBGGRR&

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Color Chart or Table for color codes

    Although thats true, why would you want to do all that extra work for determining the standard and system colors?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  5. #5

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Re: Color Chart or Table for color codes

    Was hoping there would be a simple chart where I could look for the colour I was after and copy the colour code. The standard color palette doesn't really contain the colours I want.

    I can't seem to find anything on the net which I find strange.

    This:
    color = RGB(255,255,0) '(r, g, b)
    from the sample project does the trick for me. I just need to work out what rgb's combinations I need.

    Logophobic, your's is an alternative but the above does the trick.

    Thanks all!

  7. #7
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: Color Chart or Table for color codes

    Unless you completely control the canvas you don't want to mess around with colors.

    I've seen lots of programs where somebody got "cute" with colors that looked good on his tricked out, "window-blinded" machine and were completely unreadable on a standard machine, or on XP themed machines, or when somebody chose a non-default Windows color scheme.

  8. #8
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Color Chart or Table for color codes

    Yea, like with the Janus Explorer control it uses custom colouring to achieve the XP theme color but when run under Vista its all greyed out and sickly looking. They should have had it extract and link to the resource file of the theme in use etc. But thats just my opinion.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  9. #9
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Color Chart or Table for color codes

    here is the basic values for rgb,
    Code:
       Color Red Value Green Value Blue Value 
    Black           0                      0            0 
    Blue            0                       0           255 
    Green          0                      255        0 
    Cyan           0                      255         255 
    Red             255                   0           0 
    Magenta      255                   0            255 
    Yellow         255                   255        0 
    White          255                  255         255
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width