CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Color shining

  1. #1
    Join Date
    Dec 2000
    Posts
    163

    Color shining

    Hello

    I made form with option to change color with CommonDialog (.ShowColor).

    After the user press OK I get the color from: CommonDialog.Color property.

    Is any body know how can I get the Shining of that color. (the number that represented by Lum in the CommonDialog) ???

    Thanks for any help.


  2. #2
    Join Date
    Mar 1999
    Location
    Nepal
    Posts
    540

    Re: Color shining

    Use the ColorRGBToHLS() API function to convert your RGB value into HLS.

    If this function is not available to you, but are familiar with C, the MSDN contains a source code for the conversion. Search for "RGB to HLS" (without the quotes) in MSDN and you'll get it. You can either put this code in a DLL and call it from your VB program or convert the code to VB.



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

Featured