From 5d482365cd7edbdeef9a0cddb627e8659df438ec Mon Sep 17 00:00:00 2001 From: xupei <1779019091@qq.com> Date: Thu, 7 Sep 2023 15:43:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=BB=A3=E7=A0=81=E5=88=A0?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ai/da/controller/PantoneTest.java | 45 +------------------ 1 file changed, 1 insertion(+), 44 deletions(-) diff --git a/src/test/java/com/ai/da/controller/PantoneTest.java b/src/test/java/com/ai/da/controller/PantoneTest.java index b5eaf566..f42c71b0 100644 --- a/src/test/java/com/ai/da/controller/PantoneTest.java +++ b/src/test/java/com/ai/da/controller/PantoneTest.java @@ -4,6 +4,7 @@ import com.ai.da.AiDaApplication; import com.ai.da.common.utils.PantoneUtils; import com.ai.da.service.DesignService; import com.ai.da.service.PanToneService; +import com.alibaba.fastjson.JSONObject; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; @@ -17,49 +18,5 @@ import java.util.List; @SpringBootTest(classes = AiDaApplication.class) public class PantoneTest { - @Resource - private PanToneService panToneService; - @Resource - private DesignService designService; - - @Test - public void testGetPantoneByRgbBatch(){ - List colors = Arrays.asList("244 222 222","120 57 55","229 208 207","223 184 182","80 49 48"); -// System.out.println(panToneService.getPantoneByRgbBatch(colors)); - } - - @Test - public void testDesign(){ - System.out.println(designService.detail(34182L)); - } - - @Test - public void testRgbToHsv(){ - - -// 42 228 194 -// 226 194 194 -// 174 226 20 - int[] rgb1 = {174,226,20}; - System.out.println(Arrays.toString(rgb1)); - rgb1 = PantoneUtils.rgbToHsv(rgb1); - System.out.println(Arrays.toString(rgb1)); - System.out.println(rgb1[0] * 101 * 101 + rgb1[1] * 101 + rgb1[2]); - int[] rgb2 = {226,194,194}; - System.out.println(Arrays.toString(rgb2)); - System.out.println(Arrays.toString(PantoneUtils.rgbToHsv(rgb2))); - System.out.println(rgb2[0] * 101 * 101 + rgb2[1] * 101 + rgb2[2]); - int[] rgb3 = {42,228,194}; - System.out.println(Arrays.toString(rgb3)); - System.out.println(Arrays.toString(PantoneUtils.rgbToHsv(rgb3))); - System.out.println(rgb3[0] * 101 * 101 + rgb3[1] * 101 + rgb3[2]); - - int[] rgb4 = {246,227,180}; - System.out.println(Arrays.toString(rgb4)); - rgb4 = PantoneUtils.rgbToHsv(rgb4); - System.out.println(Arrays.toString(rgb4)); - System.out.println(rgb4[0] * 101 * 101 + rgb4[1] * 101 + rgb4[2]); - } - }