如何更改图像中红色的默认色调?

时间:2022-11-21 14:55:18

In My App I need to change a dress color , i am using a colorpicker to do it.For a red color shirt i need to apply the color,its not exactly working and appearing with a dark shade.Can we change the hue for red color compatible to the picker color? here is my code

在我的应用程序中,我需要更改一种颜色,我使用颜色选择器来做它。对于一件红色衬衫,我需要应用颜色,它不完全正常工作,并出现深色阴影。我们可以改变红色的色调颜色与拾取器颜色兼容?这是我的代码

    imageLayer = [CALayer layer];
    NSLog(@"imageLayer %@",imageLayer);
    NSLog(@"self.layer %@",self.layer);
    imageLayer.frame = CGRectMake(0, 0, 660, 1000);
    imageLayer.cornerRadius = 10.0;
    imageLayer.backgroundColor = [UIColor clearColor].CGColor;
    //imageLayer.contents = (id) [UIImage imageNamed:@"3.png"].CGImage;
    imageLayer.masksToBounds = YES;
    [self.layer addSublayer:imageLayer];
    subLayer = [CALayer layer];
    subLayer.frame = CGRectMake(0, 0, 660, 1000);
    subLayer.cornerRadius = 10.0;
    subLayer.backgroundColor = [UIColor clearColor].CGColor;
    subLayer.contents = (id) [UIImage imageNamed:@"1.png"].CGImage;
    [imageLayer addSublayer:subLayer];

1 个解决方案

#1


1  

see this sample, it will help you https://github.com/RSully/RSColorPicker/

看到这个示例,它将帮助您https://github.com/RSully/RSColorPicker/

#1


1  

see this sample, it will help you https://github.com/RSully/RSColorPicker/

看到这个示例,它将帮助您https://github.com/RSully/RSColorPicker/