wangliang_wd

feat:优化早晚报背景色

@@ -237,14 +237,13 @@ export struct MorningEveningPaperComponent { @@ -237,14 +237,13 @@ export struct MorningEveningPaperComponent {
237 if (imageSource) { 237 if (imageSource) {
238 const pixelMap: image.PixelMap = await imageNet2PixelMap(imageSource); 238 const pixelMap: image.PixelMap = await imageNet2PixelMap(imageSource);
239 effectKit.createColorPicker(pixelMap, (err, colorPicker) => { 239 effectKit.createColorPicker(pixelMap, (err, colorPicker) => {
240 - let color = colorPicker.getLargestProportionColor(); 240 + let color = colorPicker.getMainColorSync();
241 console.log(TAG, "compInfoBean compStyle = " + color) 241 console.log(TAG, "compInfoBean compStyle = " + color)
242 // color = ColorUtils.getMorningEveningPaperRgb({red:color.red,green:color.green,blue:color.blue,alpha:color.alpha}) 242 // color = ColorUtils.getMorningEveningPaperRgb({red:color.red,green:color.green,blue:color.blue,alpha:color.alpha})
243 // 将取色器选取的color示例转换为十六进制颜色代码 243 // 将取色器选取的color示例转换为十六进制颜色代码
244 this.mixedBgColor = "#" + color.alpha.toString(16) + color.red.toString(16) + color.green.toString(16) + color.blue.toString(16); 244 this.mixedBgColor = "#" + color.alpha.toString(16) + color.red.toString(16) + color.green.toString(16) + color.blue.toString(16);
245 console.log(TAG, "compInfoBean compStyle = " + this.mixedBgColor) 245 console.log(TAG, "compInfoBean compStyle = " + this.mixedBgColor)
246 }); 246 });
247 -  
248 } 247 }
249 } 248 }
250 249