• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 226
  • Last Modified:

Gradient in 16 color system

I’m trying to add Gradient effect to my control, and after I finished I found that my gradient lost its colors and get a bad look when using 256 or 16 color mode system.
So I implement a palette from CPalette class and fill it with my gradient colors.
The problem has been fixed when using 256 color system, but it is still appear when using 16 color system.
Any one can help me to fix it when using 16 color mode?

thanks
0
ASD-JO
Asked:
ASD-JO
1 Solution
 
Harisha M GCommented:
Hi ASD-JO,
    It is an unsolvable problem :(
   
    In 16 colour mode, you cannot get the illusion of changing colours as there are less colours and also they are far more distinguishable ones.

Bye
---
Harish
0
 
ASD-JOAuthor Commented:

I want to add the following points:

1- In the 256 color system when select the Palette object using CDC::SelectPalette(&m_Pal, FALSE), the problem fixed as I wrote the first time, but I notice that the windows desktop lost parts of its colors in the time while my control is running. ( m_Pal is the CPalette object )

I want to ask why this happened and how can i solve this problem while keeping the quality of my gradient without effect the windows colors.

2- About the 16 color system, I don’t want to get the same quality as I get in 256 color system after using the CPalette object, but I want at least the quality that u can get when drawing using brush and region(I used this way at first but it is very slaw).
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now