WO2019006893A1 - Palette, color blending method, readable storage medium, and computer apparatus - Google Patents

Palette, color blending method, readable storage medium, and computer apparatus Download PDF

Info

Publication number
WO2019006893A1
WO2019006893A1 PCT/CN2017/103773 CN2017103773W WO2019006893A1 WO 2019006893 A1 WO2019006893 A1 WO 2019006893A1 CN 2017103773 W CN2017103773 W CN 2017103773W WO 2019006893 A1 WO2019006893 A1 WO 2019006893A1
Authority
WO
WIPO (PCT)
Prior art keywords
color
values
increment
block
wheel
Prior art date
Application number
PCT/CN2017/103773
Other languages
French (fr)
Chinese (zh)
Inventor
李幸斌
Original Assignee
广州视源电子科技股份有限公司
广州视睿电子科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 广州视源电子科技股份有限公司, 广州视睿电子科技有限公司 filed Critical 广州视源电子科技股份有限公司
Publication of WO2019006893A1 publication Critical patent/WO2019006893A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units

Definitions

  • the present invention relates to the field of color processing, and more particularly to a color wheel, a color grading method, a readable storage medium, and a computer device.
  • the color picking of terminal devices such as computers, tablets, etc.
  • the color picking of terminal devices generally controls the color change of the display screen by selecting the color on the color wheel.
  • the color palette exhibits limited color, and color adjustment is generally performed in RGB mode or HSL mode to obtain various colors.
  • RGB mode different colors are obtained by changing the R, G, and B values. This mode requires the user to be familiar with the R, G, and B values of various colors, and is not suitable for general users.
  • HSL mode the color of a hue is selected, and the color is adjusted by changing the brightness and saturation. In this mode, only the color of one hue can be adjusted. It is necessary to change the hue value to obtain the color of other hue, which is not conducive to User quick adjustment and selection of colors.
  • the invention provides a color grading method, which is applied to a color wheel, wherein the color wheel is provided with a color grading block, and the color grading method comprises:
  • the color grading method wherein the step of merging the first color and the second color according to a position increment of the movement of the toner patch to obtain a color corresponding to the second position comprises:
  • r, g, and b are R, G, and B values respectively corresponding to the color of the second position
  • r 1 , g 1 , and b 1 are respectively R, G, and B values of the first color
  • r 2 , g 2 and b 2 are respectively R, G, and B values of the second color
  • ⁇ r, ⁇ g, and ⁇ b are the R, G, and B difference values, respectively
  • ⁇ d is the color block from the first The position increment when the position is moved to the second position of the color wheel
  • D is the preset position increment.
  • the above color grading method wherein the color grading block rotates around an origin of the color wheel when the color grading block moves, and the step of calculating a position increment of the color grading block movement includes:
  • the present invention also provides a color wheel having a color block provided thereon, the color wheel comprising:
  • a color obtaining module configured to acquire a second color selected by the user
  • a color modulating module configured to reconcile the first color and the second according to a position increment of the toner patch movement when the toner patch moves from the first position to the second position of the color wheel a color to obtain a color corresponding to the second position, the first color being a color corresponding to the first position.
  • the color wheel wherein the color correction module comprises:
  • a first calculating module configured to calculate a difference between the R, G, and B values of the first color and the R, G, and B values of the second color to obtain a difference value of R, G, and B;
  • a second calculating module configured to calculate a position increment of the color block movement, and calculate a ratio of the position increment to a preset position increment
  • a third calculating module configured to calculate, according to the ratio and the R, G, and B difference values, R, G, and B values of colors corresponding to the second position;
  • the module is selected to select a color corresponding to the second location.
  • r, g, and b are R, G, and B values respectively corresponding to the color of the second position
  • r 1 , g 1 , and b 1 are respectively R, G, and B values of the first color
  • r 2 , g 2 and b 2 are respectively R, G, and B values of the second color
  • ⁇ r, ⁇ g, and ⁇ b are the R, G, and B difference values, respectively
  • ⁇ d is the color block from the first The position increment when the position is moved to the second position of the color wheel
  • D is the preset position increment.
  • the second calculation module includes:
  • a coordinate acquisition module configured to acquire coordinates of each position of the movement trajectory of the color grading block, and obtain a vector of coordinates of the origin to each position of the movement trajectory;
  • a second calculating submodule configured to calculate an angle between vectors corresponding to two adjacent positions of the moving track and calculate a sum of the angles between the first position and the second position And obtaining a position increment when the toner patch moves from the first position to the second position of the color wheel.
  • the present invention also provides a readable storage medium having stored thereon a computer program that, when executed by a processor, implements the steps of the above method.
  • a computer device comprising a memory, a processor, and a computer program stored on the memory and operative on the processor, the processor executing the program to implement the steps of the method.
  • the user may use the color of the color area at any position where the color block is located as the first color, and select the standard color preset on the color wheel as the second color, and adjust the first by moving the color block.
  • the color and the second color the color between the two colors. It is convenient for the user to debug the color by himself and get the colorful colors.
  • FIG. 1 is a flow chart of a color grading method in a first embodiment of the present invention
  • FIG. 2 is a flow chart of a color grading method in a second embodiment of the present invention.
  • FIG. 3 is a structural block diagram of a color wheel in a third embodiment of the present invention.
  • Figure 4 is a block diagram showing the structure of the color correction module.
  • a method of coloring is applied to a color wheel, and a color block is disposed on the color wheel, and the color block can be moved on the color wheel, for example, The user can drag the color block by dragging the mouse or touching the display.
  • the toning method includes steps S11 to S12.
  • step S11 the second color selected by the user is obtained.
  • a plurality of standard colors may be preset on the color wheel, and the user selects one of the colors as the second color by a mouse or a touch.
  • Step S12 when the color block is moved forward from the first position of the color wheel to the second position, the first color and the second color are adjusted according to the position increment of the color block movement, Obtaining a color corresponding to the second position, where the first color is a color corresponding to the first position.
  • the user adjusts the color between the two colors by dragging the color palette to blend the first color and the second color.
  • the toner patch moves from the first position to the second position, the resulting color changes from the first color to the second color, and the degree of change of the first color to the second color is controlled according to the position increment of the toner patch movement.
  • the user may use the color of the color area at any position where the color block is located as the first color, and select the standard color preset on the color wheel as the second color, and adjust the first color by moving the color block. And the second color, get the color between the two colors. It is convenient for the user to debug the color by himself and get the colorful colors.
  • a method of color grading according to a second embodiment of the present invention includes steps S21 to S24.
  • Step S21 Acquire a second color selected by the user.
  • Step S22 when the color block is moved forward from the first position of the color wheel to the second position, calculating R, G, and B values of the first color and R, G, and The difference between the B values gives the difference values of R, G, and B.
  • the calculation formulas for the R, G, and B delta values ⁇ r, ⁇ g, and ⁇ b are as follows:
  • r 1 , g 1 , and b 1 are R, G, and B values of the first color, respectively, and r 2 , g 2 , and b 2 are R, G, and B values of the second color, respectively.
  • Step S23 calculating a position increment of the color block movement, and calculating a ratio of the position increment and the preset position increment.
  • Step S24 calculating R, G, and B values of colors corresponding to the second position according to the ratio and the R, G, and B difference values.
  • r, g, and b are R, G, and B values respectively corresponding to the color of the second position, and ⁇ d is a position when the color block moves from the first position to the second position of the color wheel. Incremental, D is the preset position increment.
  • the preset position increment is used to control the variation range of the color, and the color obtained when the position increment of the toner patch moves is greater than or equal to the preset position increment is the second color.
  • the text or graphic can be color-filled or used as a color pen.
  • the absolute value of the position increment of the toner patch moving backward from the second position to the third position is greater than or equal to when the toner patch moves from the first position to the second position
  • the resulting color is the first color.
  • the process of reversing the color selection of the toner patch can be regarded as the reverse process of the forward movement of the toner patch process, and the principle of color blending is basically the same.
  • the shape and size of the color wheel and the color block can be designed into various shapes according to user requirements.
  • the color wheel and the color block are both circular, the diameter of the color block is equal to the radius of the color wheel, and the color block and the color wheel are inscribed, The toner patch moves around the center of the color wheel in the color wheel.
  • step of calculating the position increment of the toner patch movement includes steps S31 to S33.
  • Step S31 acquiring coordinates of each position of the movement trajectory of the color grading block, and obtaining a vector of coordinates of the origin to each position of the movement trajectory;
  • Step S32 calculating an angle between vectors corresponding to two adjacent positions of the moving track
  • Step S33 calculating a sum of the angles between the first position and the second position to obtain when the color block moves from the first position to the second position of the color wheel Position increment.
  • the position increment of the toner patch movement is the angle of rotation, that is, the angle ⁇ of rotation when the toner patch is moved from the first position to the second position is calculated.
  • the toner patch moves, it moves step by step in units of 1°.
  • the preset position increment is, for example, 720°, that is, the difference values of the three color channels of R, G, and B are equally divided into 720, and the values of each one are obtained as ⁇ r/720, ⁇ g/720, ⁇ b/720. .
  • the color block is moving forward, that is, clockwise, the R, G, and B values of the color corresponding to the second position are calculated as:
  • r', g', b' are the R, G, and B values of the color corresponding to the third position, respectively, and ⁇ is the second movement of the color block from the first position to the color wheel.
  • the angle of rotation at the position, ⁇ ' is the angle at which the toner patch rotates when moving backward from the second position to the third position.
  • ⁇ ' is more than 720°, ⁇ ' in the above formula is calculated as 720 degrees.
  • the angle at which the toner patch moves is greater than 0, and the color of the blend changes from the first color to the second color until the blended color is greater than or equal to 720 degrees.
  • a second color when the toner patch moves in the reverse direction, the angle of the toner patch moves is less than 0, and the blended color changes from the second color to the first color until the angle of the reverse movement of the toner patch is greater than or equal to ⁇ .
  • the color is the first color. If ⁇ ' is greater than 720, the 720 block can be adjusted to the first color by rotating 720 degrees counterclockwise.
  • a circular color wheel is taken as an example to describe the coloring method of the color wheel in detail.
  • the shape of the color wheel and the color block is not limited to a circular shape. It may also be a rectangle or other shape, and the position increment of the palette moving is calculated by the moving distance of the palette.
  • the color grading method further includes the steps of:
  • the color corresponding to the second position is the second color.
  • FIG. 3 is a color wheel in a third embodiment of the present invention.
  • the color wheel is provided with a color block, and the color wheel includes:
  • a color obtaining module 10 configured to acquire a second color selected by a user
  • a color modulating module 20 configured to reconcile the first color and the first portion according to a position increment of the color grading block movement when the color grading block is moved forward from the first position of the color wheel to the second position Two colors to obtain a color corresponding to the second position, the first color being a color corresponding to the first position.
  • the color modulating module shown in FIG. 4 includes:
  • the first calculating module 21 is configured to calculate a difference between the R, G, and B values of the first color and the R, G, and B values of the second color to obtain a difference value of R, G, and B;
  • a second calculating module 22 configured to calculate a position increment of the color block movement, and calculate a ratio of the position increment to a preset position increment;
  • the third calculating module 23 is configured to calculate R, G, and B values of colors corresponding to the second position according to the ratio and the R, G, and B difference values.
  • r, g, and b are R, G, and B values respectively corresponding to the color of the second position
  • r 1 , g 1 , and b 1 are respectively R, G, and B values of the first color
  • r 2 , g 2 and b 2 are respectively R, G, and B values of the second color
  • ⁇ r, ⁇ g, and ⁇ b are the R, G, and B difference values, respectively
  • ⁇ d is the color block from the first The position increment when the position is moved to the second position of the color wheel
  • D is the preset position increment.
  • the color wheel further includes:
  • the second calculating module 22 includes:
  • a coordinate acquisition module configured to acquire coordinates of each position of the movement trajectory of the color grading block, and obtain a vector of coordinates of the origin to each position of the movement trajectory;
  • a second calculating submodule configured to calculate an angle between vectors corresponding to two adjacent positions of the moving track and calculate a sum of the angles between the first position and the second position And obtaining a position increment when the toner patch moves from the first position to the second position of the color wheel.
  • the present invention also provides a readable storage medium having stored thereon a computer program, characterized in that the program is executed by a processor to implement the steps of the method of any of the above embodiments 1 and 2.
  • the present invention also provides a computer device comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, the processor implementing any one of the above embodiments 1 and 2 when the program is executed The steps of the method.
  • a "computer-readable medium” can be any apparatus that can contain, store, communicate, propagate, or transport a program for use in an instruction execution system, apparatus, or apparatus, or in conjunction with such an instruction execution system, apparatus, or apparatus.
  • computer readable media include the following: electrical connections (electronic devices) having one or more wires, portable computer disk cartridges (magnetic devices), random access memory (RAM), Read only memory (ROM), erasable editable read only memory (EPROM or flash memory), fiber optic devices, and portable compact disk read only memory (CDROM).
  • the computer readable medium may even be a paper or other suitable medium on which the program can be printed, as may The program is obtained electronically, for example by optical scanning of paper or other medium, followed by editing, interpretation or, if necessary, processing in other suitable manner, and then storing it in a computer memory.
  • portions of the invention may be implemented in hardware, software, firmware or a combination thereof.
  • multiple steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system.
  • a suitable instruction execution system For example, if implemented in hardware, as in another embodiment, it can be implemented by any one or combination of the following techniques well known in the art: having logic gates for implementing logic functions on data signals. Discrete logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.

Abstract

A palette, color blending method, readable storage medium, and computer apparatus, configured to facilitate color blending and adjustment for users to obtain various colors. The palette is provided with a color blending block. The color blending method comprises: acquiring a second color selected by a user (S11); and when the blending block moves in a positive direction from a first position of the palette to a second position thereof, blending, according to a position increment of the movement of the blending block, a first color and the second color to obtain a color corresponding to the second position, the first color being a color corresponding to the first position (S12). The present invention acquires, by moving the blending block to blend the first color and second color, a color therebetween.

Description

色盘、调色方法、可读存储介质和计算机设备Color wheel, color method, readable storage medium, and computer device 技术领域Technical field
本发明涉及颜色处理领域,特别是涉及一种色盘、调色方法、可读存储介质和计算机设备。The present invention relates to the field of color processing, and more particularly to a color wheel, a color grading method, a readable storage medium, and a computer device.
背景技术Background technique
目前终端设备如电脑、平板等的取色,一般是通过选取色盘上的颜色来控制显示画面的颜色变化。At present, the color picking of terminal devices such as computers, tablets, etc., generally controls the color change of the display screen by selecting the color on the color wheel.
然而,色盘呈现的颜色有限,一般在RGB模式或HSL模式下进行颜色调节获得各种颜色。RGB模式下,通过改变R、G、B值获取不同的颜色,该种模式下要求用户对各种颜色的R、G、B值非常熟悉,不适用于一般的用户。HSL模式下,选取一种色相的颜色,通过改变亮度和饱和度进行颜色的调节,而该种模式下只能对一种色相的颜色进行调节,需改变色相值获取其他色相的颜色,不利于用户对颜色的快速调节和选择。However, the color palette exhibits limited color, and color adjustment is generally performed in RGB mode or HSL mode to obtain various colors. In RGB mode, different colors are obtained by changing the R, G, and B values. This mode requires the user to be familiar with the R, G, and B values of various colors, and is not suitable for general users. In HSL mode, the color of a hue is selected, and the color is adjusted by changing the brightness and saturation. In this mode, only the color of one hue can be adjusted. It is necessary to change the hue value to obtain the color of other hue, which is not conducive to User quick adjustment and selection of colors.
发明内容Summary of the invention
鉴于上述状况,有必要针对现有技术中颜色调节效率低的问题,提供一种一种色盘、调色方法、可读存储介质和计算机设备。In view of the above circumstances, it is necessary to provide a color wheel, a color grading method, a readable storage medium, and a computer device in view of the problem of low color adjustment efficiency in the prior art.
本发明提供了一种调色方法,应用于色盘,所述色盘上设有调色块,所述调色方法包括:The invention provides a color grading method, which is applied to a color wheel, wherein the color wheel is provided with a color grading block, and the color grading method comprises:
获取用户选择的第二颜色;Obtain a second color selected by the user;
当所述调色块从所述色盘的第一位置正向移动到第二位置时,根据所述调色块移动的位置增量调和第一颜色和所述第二颜色,以得到所述第二位置对应的颜色,所述第一颜色为所述第一位置对应的颜色。Reconciling the first color and the second color according to a position increment of the toner patch movement when the toner patch is moved forward from the first position of the color wheel to the second position to obtain the a color corresponding to the second position, wherein the first color is a color corresponding to the first position.
上述调色方法,其中,所述根据所述调色块的移动的位置增量调和所述第一颜色和所述第二颜色,以得到所述第二位置对应的颜色的步骤包括:The color grading method, wherein the step of merging the first color and the second color according to a position increment of the movement of the toner patch to obtain a color corresponding to the second position comprises:
计算第一颜色的R、G、B值分别与所述第二颜色的R、G、B值的差值, 得到R、G、B差量值;Calculating a difference between the R, G, and B values of the first color and the R, G, and B values of the second color, respectively, Obtaining R, G, B difference values;
计算所述调色块移动的位置增量,并计算所述位置增量和预设位置增量的比值;Calculating a position increment of the color block movement, and calculating a ratio of the position increment to a preset position increment;
根据所述比值和所述R、G、B差量值计算所述第二位置对应的颜色的R、G、B值。Calculating R, G, and B values of the color corresponding to the second position according to the ratio and the R, G, and B difference values.
上述调色方法,其中,所述第二位置对应的颜色的R、G、B值的计算公式为:In the above color grading method, the calculation formulas of the R, G, and B values of the color corresponding to the second position are:
当Δd≤D时,
Figure PCTCN2017103773-appb-000001
When Δd ≤ D,
Figure PCTCN2017103773-appb-000001
当Δd>D时,
Figure PCTCN2017103773-appb-000002
When Δd>D,
Figure PCTCN2017103773-appb-000002
其中,r、g、b分别为所述第二位置对应颜色的R、G、B值,r1、g1、b1分别为所述第一颜色的R、G、B值,r2、g2、b2分别为所述第二颜色的R、G、B值,Δr、Δg、Δb分别为所述R、G、B差量值,Δd为所述调色块从所述第一位置移动到所述色盘的第二位置时的位置增量,D为所述预设位置增量。Wherein r, g, and b are R, G, and B values respectively corresponding to the color of the second position, and r 1 , g 1 , and b 1 are respectively R, G, and B values of the first color, r 2 , g 2 and b 2 are respectively R, G, and B values of the second color, and Δr, Δg, and Δb are the R, G, and B difference values, respectively, and Δd is the color block from the first The position increment when the position is moved to the second position of the color wheel, and D is the preset position increment.
上述调色方法,其中,当所述调色块从所述第二位置逆向移动到第三位置的位置增量的绝对值大于或等于所述调色块从所述第一位置移动到所述第二位置时,得到的颜色为所述第一颜色。The above color grading method, wherein an absolute value of a position increment when the toner patch is reversely moved from the second position to a third position is greater than or equal to the toner patch moving from the first position to the In the second position, the resulting color is the first color.
上述调色方法,其中,所述调色块移动时绕所述色盘的原点旋转,所述计算所述调色块移动的位置增量的步骤包括:The above color grading method, wherein the color grading block rotates around an origin of the color wheel when the color grading block moves, and the step of calculating a position increment of the color grading block movement includes:
获取所述调色块的移动轨迹的每一个位置的坐标,并得到所述原点到所述移动轨迹的每一个位置的坐标的向量;Obtaining coordinates of each position of the movement trajectory of the color grading block, and obtaining a vector of coordinates of the origin to each position of the movement trajectory;
计算所述移动轨迹的相邻的两个位置对应的向量之间的夹角以及计算所述第一位置到所述第二位置之间的所述夹角的和,以得到所述调色块从所述第一 位置移动到所述色盘的第二位置时的位置增量。Calculating an angle between vectors corresponding to two adjacent positions of the moving track and calculating a sum of the angles between the first position and the second position to obtain the color block From the first The position increment when the position is moved to the second position of the color wheel.
本发明还提供了一种色盘,所述色盘上设有调色块,所述色盘包括:The present invention also provides a color wheel having a color block provided thereon, the color wheel comprising:
颜色获取模块,用于获取用户选择的第二颜色;a color obtaining module, configured to acquire a second color selected by the user;
调色模块,用于当所述调色块从所述色盘的第一位置正向移动到第二位置时,根据所述调色块移动的位置增量调和第一颜色和所述第二颜色,以得到所述第二位置对应的颜色,所述第一颜色为所述第一位置对应的颜色。a color modulating module, configured to reconcile the first color and the second according to a position increment of the toner patch movement when the toner patch moves from the first position to the second position of the color wheel a color to obtain a color corresponding to the second position, the first color being a color corresponding to the first position.
上述色盘,其中,所述调色模块包括:The color wheel, wherein the color correction module comprises:
第一计算模块,用于计算第一颜色的R、G、B值分别与所述第二颜色的R、G、B值的差值,得到R、G、B差量值;a first calculating module, configured to calculate a difference between the R, G, and B values of the first color and the R, G, and B values of the second color to obtain a difference value of R, G, and B;
第二计算模块,用于计算所述调色块移动的位置增量,并计算所述位置增量和预设位置增量的比值;a second calculating module, configured to calculate a position increment of the color block movement, and calculate a ratio of the position increment to a preset position increment;
第三计算模块,用于根据所述比值和所述R、G、B差量值计算所述第二位置对应的颜色的R、G、B值;a third calculating module, configured to calculate, according to the ratio and the R, G, and B difference values, R, G, and B values of colors corresponding to the second position;
选取模块,用于选取所述第二位置对应的颜色。The module is selected to select a color corresponding to the second location.
上述色盘,其中,所述第二位置对应的颜色的R、G、B值的计算公式为:The color wheel, wherein the calculation formula of the R, G, and B values of the color corresponding to the second position is:
当Δd≤D时,
Figure PCTCN2017103773-appb-000003
When Δd ≤ D,
Figure PCTCN2017103773-appb-000003
当Δd>D时,
Figure PCTCN2017103773-appb-000004
When Δd>D,
Figure PCTCN2017103773-appb-000004
其中,r、g、b分别为所述第二位置对应颜色的R、G、B值,r1、g1、b1分别为所述第一颜色的R、G、B值,r2、g2、b2分别为所述第二颜色的R、G、B值,Δr、Δg、Δb分别为所述R、G、B差量值,Δd为所述调色块从所述第一位置移动到所述色盘的第二位置时的位置增量,D为所述预设位置增量。Wherein r, g, and b are R, G, and B values respectively corresponding to the color of the second position, and r 1 , g 1 , and b 1 are respectively R, G, and B values of the first color, r 2 , g 2 and b 2 are respectively R, G, and B values of the second color, and Δr, Δg, and Δb are the R, G, and B difference values, respectively, and Δd is the color block from the first The position increment when the position is moved to the second position of the color wheel, and D is the preset position increment.
上述色盘,其中, The above color wheel, wherein
当所述调色块从所述第二位置逆向移动到第三位置的位置增量的绝对值大于或等于所述调色块从所述第一位置移动到所述第二位置时,得到的颜色为所述第一颜色。Obtained when the absolute value of the position increment of the toner patch moving backward from the second position to the third position is greater than or equal to the color block moving from the first position to the second position The color is the first color.
上述色盘,其中,所述调色块移动时绕所述色盘的原点旋转,所述第二计算模块包括:The color wheel, wherein the color block rotates around an origin of the color wheel when moving, the second calculation module includes:
坐标获取模块,用于获取所述调色块的移动轨迹的每一个位置的坐标,并得到所述原点到所述移动轨迹的每一个位置的坐标的向量;a coordinate acquisition module, configured to acquire coordinates of each position of the movement trajectory of the color grading block, and obtain a vector of coordinates of the origin to each position of the movement trajectory;
第二计算子模块,用于计算所述移动轨迹的相邻的两个位置对应的向量之间的夹角以及计算所述第一位置到所述第二位置之间的所述夹角的和,以得到所述调色块从所述第一位置移动到所述色盘的第二位置时的位置增量。a second calculating submodule, configured to calculate an angle between vectors corresponding to two adjacent positions of the moving track and calculate a sum of the angles between the first position and the second position And obtaining a position increment when the toner patch moves from the first position to the second position of the color wheel.
本发明还提供了一种可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述方法的步骤。The present invention also provides a readable storage medium having stored thereon a computer program that, when executed by a processor, implements the steps of the above method.
一种计算机设备,包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现上述方法的步骤。A computer device comprising a memory, a processor, and a computer program stored on the memory and operative on the processor, the processor executing the program to implement the steps of the method.
本发明实施例中,用户可以以调色块所在的任意一位置的颜色区域的颜色作为第一颜色,并选取色盘上预设的标准颜色作为第二颜色,通过移动调色块调和第一颜色和第二颜色,获取两个颜色之间的颜色。方便用户自行调试颜色,得到变化多彩的颜色。In the embodiment of the present invention, the user may use the color of the color area at any position where the color block is located as the first color, and select the standard color preset on the color wheel as the second color, and adjust the first by moving the color block. The color and the second color, the color between the two colors. It is convenient for the user to debug the color by himself and get the colorful colors.
附图说明DRAWINGS
图1为本发明第一实施例中的调色方法流程图;1 is a flow chart of a color grading method in a first embodiment of the present invention;
图2为本发明第二实施例中的调色方法流程图;2 is a flow chart of a color grading method in a second embodiment of the present invention;
图3为本发明第三实施例中的色盘的结构框图;3 is a structural block diagram of a color wheel in a third embodiment of the present invention;
图4图3中调色模块的结构框图。Figure 4 is a block diagram showing the structure of the color correction module.
具体实施方式Detailed ways
下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元 件。下面通过参考附图描述的实施例是示例性的,仅用于解释本发明,而不能理解为对本发明的限制。The embodiments of the present invention are described in detail below, and the examples of the embodiments are illustrated in the accompanying drawings, wherein the same or similar reference numerals are used to refer to the same or similar elements or elements having the same or similar functions. Pieces. The embodiments described below with reference to the accompanying drawings are intended to be illustrative of the invention and are not to be construed as limiting.
参照下面的描述和附图,将清楚本发明的实施例的这些和其他方面。在这些描述和附图中,具体公开了本发明的实施例中的一些特定实施方式,来表示实施本发明的实施例的原理的一些方式,但是应当理解,本发明的实施例的范围不受此限制。相反,本发明的实施例包括落入所附加权利要求书的精神和内涵范围内的所有变化、修改和等同物。These and other aspects of the embodiments of the present invention will be apparent from the description and appended claims. In the description and drawings, specific embodiments of the embodiments of the invention are disclosed This limit. Rather, the invention is to cover all modifications, variations and equivalents within the spirit and scope of the appended claims.
请参阅图1,为本发明第一实施例中的,调色方法,应用于色盘,所述色盘上设有调色块,所述调色块可在所述色盘上移动,例如用户可通过拖动鼠标或触摸显示屏的方式拖动所述调色块。如图1所示,所述调色方法包括步骤S11~S12。Referring to FIG. 1, in a first embodiment of the present invention, a method of coloring is applied to a color wheel, and a color block is disposed on the color wheel, and the color block can be moved on the color wheel, for example, The user can drag the color block by dragging the mouse or touching the display. As shown in FIG. 1, the toning method includes steps S11 to S12.
步骤S11,获取用户选择的第二颜色。所述色盘上可以预设多个的标准颜色,用户通过鼠标或触摸选择其中一个颜色作为第二颜色。In step S11, the second color selected by the user is obtained. A plurality of standard colors may be preset on the color wheel, and the user selects one of the colors as the second color by a mouse or a touch.
步骤S12,当所述调色块从所述色盘的第一位置正向移动到第二位置时,根据所述调色块移动的位置增量调和第一颜色和所述第二颜色,以得到所述第二位置对应的颜色,所述第一颜色为所述第一位置对应的颜色。Step S12, when the color block is moved forward from the first position of the color wheel to the second position, the first color and the second color are adjusted according to the position increment of the color block movement, Obtaining a color corresponding to the second position, where the first color is a color corresponding to the first position.
用户通过拖动调色块调和第一颜色和第二颜色得到介于两个颜色之间的颜色。调色块从第一位置相第二位置移动时,得到的颜色从第一颜色向第二颜色变化,根据调色块移动的位置增量控制第一颜色向第二颜色的变化程度。The user adjusts the color between the two colors by dragging the color palette to blend the first color and the second color. When the toner patch moves from the first position to the second position, the resulting color changes from the first color to the second color, and the degree of change of the first color to the second color is controlled according to the position increment of the toner patch movement.
本实施例中,用户可以以调色块所在的任意一位置的颜色区域的颜色作为第一颜色,并选取色盘上预设的标准颜色作为第二颜色,通过移动调色块调和第一颜色和第二颜色,获取两个颜色之间的颜色。方便用户自行调试颜色,得到变化多彩的颜色。In this embodiment, the user may use the color of the color area at any position where the color block is located as the first color, and select the standard color preset on the color wheel as the second color, and adjust the first color by moving the color block. And the second color, get the color between the two colors. It is convenient for the user to debug the color by himself and get the colorful colors.
请参阅图2,为本发明第二实施例中的调色方法,包括步骤S21~S24。Referring to FIG. 2, a method of color grading according to a second embodiment of the present invention includes steps S21 to S24.
步骤S21,获取用户选择的第二颜色。Step S21: Acquire a second color selected by the user.
步骤S22,当所述调色块从所述色盘的第一位置正向移动到第二位置时,计算第一颜色的R、G、B值分别与所述第二颜色的R、G、B值的差值,得到R、G、B差量值。R、G、B差量值Δr、Δg和Δb的计算公式如下: Step S22, when the color block is moved forward from the first position of the color wheel to the second position, calculating R, G, and B values of the first color and R, G, and The difference between the B values gives the difference values of R, G, and B. The calculation formulas for the R, G, and B delta values Δr, Δg, and Δb are as follows:
Δr=r2-r1Δr=r 2 -r 1 ;
Δg=g2-g1Δg=g 2 -g 1 ;
Δb=b2-b1Δb=b 2 -b 1 ;
其中,r1、g1、b1分别为所述第一颜色的R、G、B值,r2、g2、b2分别为所述第二颜色的R、G、B值。Wherein r 1 , g 1 , and b 1 are R, G, and B values of the first color, respectively, and r 2 , g 2 , and b 2 are R, G, and B values of the second color, respectively.
步骤S23,计算所述调色块移动的位置增量,并计算所述位置增量和预设位置增量的比值。Step S23, calculating a position increment of the color block movement, and calculating a ratio of the position increment and the preset position increment.
步骤S24,根据所述比值和所述R、G、B差量值计算所述第二位置对应的颜色的R、G、B值。Step S24, calculating R, G, and B values of colors corresponding to the second position according to the ratio and the R, G, and B difference values.
上述步骤中,所述第二位置对应的颜色的R、G、B值的计算公式为:In the above steps, the calculation formulas of the R, G, and B values of the color corresponding to the second position are:
当Δd≤D时,
Figure PCTCN2017103773-appb-000005
When Δd ≤ D,
Figure PCTCN2017103773-appb-000005
当Δd>D时,
Figure PCTCN2017103773-appb-000006
When Δd>D,
Figure PCTCN2017103773-appb-000006
其中,r、g、b分别为所述第二位置对应颜色的R、G、B值,Δd为所述调色块从所述第一位置移动到所述色盘的第二位置时的位置增量,D为所述预设位置增量。Wherein, r, g, and b are R, G, and B values respectively corresponding to the color of the second position, and Δd is a position when the color block moves from the first position to the second position of the color wheel. Incremental, D is the preset position increment.
预设位置增量是用来控制颜色的变化范围,当调色块移动的位置增量大于或等于预设位置增量时得到的颜色为第二颜色。当选取色盘第二位置对应的颜色后,便可对文本或图形进行颜色填充,或作为颜色笔使用。The preset position increment is used to control the variation range of the color, and the color obtained when the position increment of the toner patch moves is greater than or equal to the preset position increment is the second color. When the color corresponding to the second position of the color wheel is selected, the text or graphic can be color-filled or used as a color pen.
进一步的,当所述调色块从所述第二位置逆向移动到第三位置的位置增量的绝对值大于或等于所述调色块从所述第一位置移动到所述第二位置时,得到的颜色为所述第一颜色。可以将逆向移动所述调色块选取颜色的过程看做正向移动所述调色块过程的逆向过程,其颜色调和的原理基本相同。 Further, when the absolute value of the position increment of the toner patch moving backward from the second position to the third position is greater than or equal to when the toner patch moves from the first position to the second position The resulting color is the first color. The process of reversing the color selection of the toner patch can be regarded as the reverse process of the forward movement of the toner patch process, and the principle of color blending is basically the same.
本实施例中,所述色盘和调色块的形状、大下根据用户需求可设计为各种形状。例如本实施例中,所述色盘和所述调色块均为圆形,所述调色块的直径等于所述色盘的半径,所述调色块与所述色盘内切,所述调色块在所述色盘绕所述色盘的圆心移动。In this embodiment, the shape and size of the color wheel and the color block can be designed into various shapes according to user requirements. For example, in the embodiment, the color wheel and the color block are both circular, the diameter of the color block is equal to the radius of the color wheel, and the color block and the color wheel are inscribed, The toner patch moves around the center of the color wheel in the color wheel.
进一步的,所述计算所述调色块移动的位置增量的步骤包括步骤S31~S33。Further, the step of calculating the position increment of the toner patch movement includes steps S31 to S33.
步骤S31,获取所述调色块的移动轨迹的每一个位置的坐标,并得到所述原点到所述移动轨迹的每一个位置的坐标的向量;Step S31, acquiring coordinates of each position of the movement trajectory of the color grading block, and obtaining a vector of coordinates of the origin to each position of the movement trajectory;
步骤S32,计算所述移动轨迹的相邻的两个位置对应的向量之间的夹角;Step S32, calculating an angle between vectors corresponding to two adjacent positions of the moving track;
步骤S33,计算所述第一位置到所述第二位置之间的所述夹角的和,以得到所述调色块从所述第一位置移动到所述色盘的第二位置时的位置增量。Step S33, calculating a sum of the angles between the first position and the second position to obtain when the color block moves from the first position to the second position of the color wheel Position increment.
上述步骤中,调色块移动的位置增量为旋转的角度,即,计算从调色块在第一位置移动至第二位置时旋转的角度θ。所述调色块移动时,以1°为单位逐步移动。In the above steps, the position increment of the toner patch movement is the angle of rotation, that is, the angle θ of rotation when the toner patch is moved from the first position to the second position is calculated. When the toner patch moves, it moves step by step in units of 1°.
所述预设位置增量例如为720°,即将R、G、B三个颜色通道的差量值均分为720份,得到每一份的值为Δr/720、Δg/720、Δb/720。当所述调色块正向移动,即顺时针转动时,所述第二位置对应的颜色的R、G、B值的计算公式为:The preset position increment is, for example, 720°, that is, the difference values of the three color channels of R, G, and B are equally divided into 720, and the values of each one are obtained as Δr/720, Δg/720, Δb/720. . When the color block is moving forward, that is, clockwise, the R, G, and B values of the color corresponding to the second position are calculated as:
当θ≤720时,
Figure PCTCN2017103773-appb-000007
When θ ≤ 720,
Figure PCTCN2017103773-appb-000007
当θ>720时,
Figure PCTCN2017103773-appb-000008
When θ>720,
Figure PCTCN2017103773-appb-000008
当所述调色块逆时针从所述第二位置移动到第三位置时,所述第三位置对应的颜色的R、G、B值的计算公式为: When the color block moves from the second position to the third position counterclockwise, the calculation formulas of the R, G, and B values of the color corresponding to the third position are:
当-720≤θ’≤0,且θ≤720时,
Figure PCTCN2017103773-appb-000009
When -720 ≤ θ' ≤ 0, and θ ≤ 720,
Figure PCTCN2017103773-appb-000009
当-720≤θ’≤0,且θ>720时,
Figure PCTCN2017103773-appb-000010
When -720≤θ'≤0, and θ>720,
Figure PCTCN2017103773-appb-000010
当θ’<-720时,
Figure PCTCN2017103773-appb-000011
When θ'<-720,
Figure PCTCN2017103773-appb-000011
其中,r’、g’、b’分别为所述第三位置对应的颜色的R、G、B值,θ为所述调色块从所述第一位置移动到所述色盘的第二位置时旋转的角度,θ’为所述调色块从所述第二位置逆向移动到所述第三位置时旋转的角度。当θ’大于720°时,上式中的θ’按720度计算。Wherein r', g', b' are the R, G, and B values of the color corresponding to the third position, respectively, and θ is the second movement of the color block from the first position to the color wheel. The angle of rotation at the position, θ' is the angle at which the toner patch rotates when moving backward from the second position to the third position. When θ' is more than 720°, θ' in the above formula is calculated as 720 degrees.
当所述调色块正向移动时,调色块移动的角度大于0,调和的颜色从第一颜色向第二颜色变化,直到调色块移动的角度大于或等于720度时调和后的颜色为第二颜色;当调色块逆向移动时,调色块移动的角度小于0,调和的颜色从第二颜色向第一颜色变化,直到调色块逆向移动的角度大于或等于θ时调和后的颜色为第一颜色。若θ’大于720时,按720计算,调色块只需逆时针旋转720度即可调到第一颜色。When the toner patch moves forward, the angle at which the toner patch moves is greater than 0, and the color of the blend changes from the first color to the second color until the blended color is greater than or equal to 720 degrees. a second color; when the toner patch moves in the reverse direction, the angle of the toner patch moves is less than 0, and the blended color changes from the second color to the first color until the angle of the reverse movement of the toner patch is greater than or equal to θ. The color is the first color. If θ' is greater than 720, the 720 block can be adjusted to the first color by rotating 720 degrees counterclockwise.
本实施例以圆形的色盘为例,详细说明了色盘的调色方法,可以理解的,本发明的其他实施例中,所述色盘和所述色块的形状不限于圆形,也可以为矩形或其他形状,调色块移动的位置增量以调色块的移动路程来计算。In this embodiment, a circular color wheel is taken as an example to describe the coloring method of the color wheel in detail. In other embodiments of the present invention, the shape of the color wheel and the color block is not limited to a circular shape. It may also be a rectangle or other shape, and the position increment of the palette moving is calculated by the moving distance of the palette.
进一步的,在本发明的另一实施例中,所述调色方法还包括步骤:Further, in another embodiment of the present invention, the color grading method further includes the steps of:
当获取到第二颜色,且所述调色块未移动时,所述第二位置对应的颜色为所述第二颜色。 When the second color is acquired and the color block is not moved, the color corresponding to the second position is the second color.
即,获取第二颜色后不移动调色块时,不进行两个颜色的调和,直接选用第二颜色。That is, when the color patch is not moved after the second color is acquired, the two colors are not adjusted, and the second color is directly selected.
请参阅图3,为本发明第三实施例中的色盘,所述色盘上设有调色块,所述色盘包括:Please refer to FIG. 3, which is a color wheel in a third embodiment of the present invention. The color wheel is provided with a color block, and the color wheel includes:
颜色获取模块10,用于获取用户选择的第二颜色;a color obtaining module 10, configured to acquire a second color selected by a user;
调色模块20,用于当所述调色块从所述色盘的第一位置正向移动到第二位置时,根据所述调色块移动的位置增量调和第一颜色和所述第二颜色,以得到所述第二位置对应的颜色,所述第一颜色为所述第一位置对应的颜色。a color modulating module 20, configured to reconcile the first color and the first portion according to a position increment of the color grading block movement when the color grading block is moved forward from the first position of the color wheel to the second position Two colors to obtain a color corresponding to the second position, the first color being a color corresponding to the first position.
进一步的,如图4所示所述调色模块包括:Further, the color modulating module shown in FIG. 4 includes:
第一计算模块21,用于计算第一颜色的R、G、B值分别与所述第二颜色的R、G、B值的差值,得到R、G、B差量值;The first calculating module 21 is configured to calculate a difference between the R, G, and B values of the first color and the R, G, and B values of the second color to obtain a difference value of R, G, and B;
第二计算模块22,用于计算所述调色块移动的位置增量,并计算所述位置增量和预设位置增量的比值;a second calculating module 22, configured to calculate a position increment of the color block movement, and calculate a ratio of the position increment to a preset position increment;
第三计算模块23,用于根据所述比值和所述R、G、B差量值计算所述第二位置对应的颜色的R、G、B值。The third calculating module 23 is configured to calculate R, G, and B values of colors corresponding to the second position according to the ratio and the R, G, and B difference values.
进一步的,所述第二位置对应的颜色的R、G、B值的计算公式为:Further, the calculation formulas of the R, G, and B values of the color corresponding to the second position are:
当Δd≤D时,
Figure PCTCN2017103773-appb-000012
When Δd ≤ D,
Figure PCTCN2017103773-appb-000012
当Δd>D时,
Figure PCTCN2017103773-appb-000013
When Δd>D,
Figure PCTCN2017103773-appb-000013
其中,r、g、b分别为所述第二位置对应颜色的R、G、B值,r1、g1、b1分别为所述第一颜色的R、G、B值,r2、g2、b2分别为所述第二颜色的R、G、B值,Δr、Δg、Δb分别为所述R、G、B差量值,Δd为所述调色块从所述第一位置移动到所述色盘的第二位置时的位置增量,D为所述预设位置增量。 Wherein r, g, and b are R, G, and B values respectively corresponding to the color of the second position, and r 1 , g 1 , and b 1 are respectively R, G, and B values of the first color, r 2 , g 2 and b 2 are respectively R, G, and B values of the second color, and Δr, Δg, and Δb are the R, G, and B difference values, respectively, and Δd is the color block from the first The position increment when the position is moved to the second position of the color wheel, and D is the preset position increment.
进步的,所述色盘还包括:In progress, the color wheel further includes:
进一步的,当所述调色块从所述第二位置逆向移动到第三位置的位置增量的绝对值大于或等于所述调色块从所述第一位置移动到所述第二位置时,得到的颜色为所述第一颜色。Further, when the absolute value of the position increment of the toner patch moving backward from the second position to the third position is greater than or equal to when the toner patch moves from the first position to the second position The resulting color is the first color.
进一步的,所述调色块移动时绕所述色盘的原点旋转,所述第二计算模块22包括:Further, when the color grading block moves around the origin of the color wheel, the second calculating module 22 includes:
坐标获取模块,用于获取所述调色块的移动轨迹的每一个位置的坐标,并得到所述原点到所述移动轨迹的每一个位置的坐标的向量;a coordinate acquisition module, configured to acquire coordinates of each position of the movement trajectory of the color grading block, and obtain a vector of coordinates of the origin to each position of the movement trajectory;
第二计算子模块,用于计算所述移动轨迹的相邻的两个位置对应的向量之间的夹角以及计算所述第一位置到所述第二位置之间的所述夹角的和,以得到所述调色块从所述第一位置移动到所述色盘的第二位置时的位置增量。a second calculating submodule, configured to calculate an angle between vectors corresponding to two adjacent positions of the moving track and calculate a sum of the angles between the first position and the second position And obtaining a position increment when the toner patch moves from the first position to the second position of the color wheel.
本发明还提供了一种可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现上述实施例1和2中任意一个的方法的步骤。The present invention also provides a readable storage medium having stored thereon a computer program, characterized in that the program is executed by a processor to implement the steps of the method of any of the above embodiments 1 and 2.
本发明还提供了一种计算机设备,包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现上述实施例1和2中任意一个的方法的步骤。The present invention also provides a computer device comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, the processor implementing any one of the above embodiments 1 and 2 when the program is executed The steps of the method.
在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,“计算机可读介质”可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。The logic and/or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be embodied in any computer readable medium, Used in conjunction with, or in conjunction with, an instruction execution system, apparatus, or device (eg, a computer-based system, a system including a processor, or other system that can fetch instructions and execute instructions from an instruction execution system, apparatus, or device) Or use with equipment. For the purposes of this specification, a "computer-readable medium" can be any apparatus that can contain, store, communicate, propagate, or transport a program for use in an instruction execution system, apparatus, or apparatus, or in conjunction with such an instruction execution system, apparatus, or apparatus.
计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以 例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。More specific examples (non-exhaustive list) of computer readable media include the following: electrical connections (electronic devices) having one or more wires, portable computer disk cartridges (magnetic devices), random access memory (RAM), Read only memory (ROM), erasable editable read only memory (EPROM or flash memory), fiber optic devices, and portable compact disk read only memory (CDROM). In addition, the computer readable medium may even be a paper or other suitable medium on which the program can be printed, as may The program is obtained electronically, for example by optical scanning of paper or other medium, followed by editing, interpretation or, if necessary, processing in other suitable manner, and then storing it in a computer memory.
应当理解,本发明的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that portions of the invention may be implemented in hardware, software, firmware or a combination thereof. In the above-described embodiments, multiple steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one or combination of the following techniques well known in the art: having logic gates for implementing logic functions on data signals. Discrete logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。In the description of the present specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" and the like means a specific feature described in connection with the embodiment or example. A structure, material or feature is included in at least one embodiment or example of the invention. In the present specification, the schematic representation of the above terms does not necessarily mean the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in a suitable manner in any one or more embodiments or examples.
以上所述实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。 The above-mentioned embodiments are merely illustrative of several embodiments of the present invention, and the description thereof is more specific and detailed, but is not to be construed as limiting the scope of the invention. It should be noted that a number of variations and modifications may be made by those skilled in the art without departing from the spirit and scope of the invention. Therefore, the scope of the invention should be determined by the appended claims.

Claims (10)

  1. 一种调色方法,其特征在于,应用于色盘,所述色盘上设有调色块,所述调色方法包括:A color grading method, which is applied to a color wheel, wherein the color wheel is provided with a color grading block, and the color grading method comprises:
    获取用户选择的第二颜色;Obtain a second color selected by the user;
    当所述调色块从所述色盘的第一位置正向移动到第二位置时,根据所述调色块移动的位置增量调和第一颜色和所述第二颜色,以得到所述第二位置对应的颜色,所述第一颜色为所述第一位置对应的颜色。Reconciling the first color and the second color according to a position increment of the toner patch movement when the toner patch is moved forward from the first position of the color wheel to the second position to obtain the a color corresponding to the second position, wherein the first color is a color corresponding to the first position.
  2. 如权利要求1所述的调色方法,其特征在于,所述根据所述调色块的移动的位置增量调和所述第一颜色和所述第二颜色,以得到所述第二位置对应的颜色的步骤包括:The color grading method according to claim 1, wherein said first color and said second color are blended in accordance with a positional increment of movement of said toner patch to obtain said second position corresponding The steps of the color include:
    计算第一颜色的R、G、B值分别与所述第二颜色的R、G、B值的差值,得到R、G、B差量值;Calculating a difference between the R, G, and B values of the first color and the R, G, and B values of the second color to obtain a difference value of R, G, and B;
    计算所述调色块移动的位置增量,并计算所述位置增量和预设位置增量的比值;Calculating a position increment of the color block movement, and calculating a ratio of the position increment to a preset position increment;
    根据所述比值和所述R、G、B差量值计算所述第二位置对应的颜色的R、G、B值。Calculating R, G, and B values of the color corresponding to the second position according to the ratio and the R, G, and B difference values.
  3. 如权利要求2所述的调色方法,其特征在于,所述第二位置对应的颜色的R、G、B值的计算公式为:The color grading method according to claim 2, wherein the calculation formula of the R, G, and B values of the color corresponding to the second position is:
    当Δd≤D时,
    Figure PCTCN2017103773-appb-100001
    When Δd ≤ D,
    Figure PCTCN2017103773-appb-100001
    当Δd>D时,
    Figure PCTCN2017103773-appb-100002
    When Δd>D,
    Figure PCTCN2017103773-appb-100002
    其中,r、g、b分别为所述第二位置对应颜色的R、G、B值,r1、g1、b1分别为所述第一颜色的R、G、B值,r2、g2、b2分别为所述第二颜色的R、G、B值,Δr、Δg、Δb分别为所述R、G、B差量值,Δd为所述调色块从所述第一 位置移动到所述第二位置时的位置增量,D为所述预设位置增量。Wherein r, g, and b are R, G, and B values respectively corresponding to the color of the second position, and r 1 , g 1 , and b 1 are R, G, and B values of the first color, respectively, r 2 , g 2 and b 2 are respectively R, G, and B values of the second color, and Δr, Δg, and Δb are the R, G, and B difference values, respectively, and Δd is the color block from the first a position increment when the position moves to the second position, and D is the preset position increment.
  4. 如权利要求1所述的调色方法,其特征在于,当所述调色块从所述第二位置逆向移动到第三位置时的位置增量的绝对值大于或等于所述调色块从所述第一位置移动到所述第二位置时,得到的颜色为所述第一颜色。The color grading method according to claim 1, wherein an absolute value of a position increment when said toner patch is reversely moved from said second position to said third position is greater than or equal to said toner patch When the first position is moved to the second position, the obtained color is the first color.
  5. 如权利要求2所述的调色方法,其特征在于,所述调色块移动时绕所述色盘的原点旋转,所述计算所述调色块移动的位置增量的步骤包括:A method of grading according to claim 2, wherein said toner patch is rotated about an origin of said color wheel as it moves, said step of calculating a position increment of said toner patch movement comprising:
    获取所述调色块的移动轨迹的每一个位置的坐标,并得到所述原点到所述移动轨迹的每一个位置的坐标的向量;Obtaining coordinates of each position of the movement trajectory of the color grading block, and obtaining a vector of coordinates of the origin to each position of the movement trajectory;
    计算所述移动轨迹的相邻的两个位置对应的向量之间的夹角以及计算所述第一位置到所述第二位置之间的所述夹角的和,以得到所述调色块从所述第一位置移动到所述第二位置时的位置增量。Calculating an angle between vectors corresponding to two adjacent positions of the moving track and calculating a sum of the angles between the first position and the second position to obtain the color block A position increment when moving from the first position to the second position.
  6. 一种色盘,其特征在于,所述色盘上设有调色块,所述色盘包括:A color wheel, characterized in that the color wheel is provided with a color block, and the color wheel comprises:
    颜色获取模块,用于获取用户选择的第二颜色;a color obtaining module, configured to acquire a second color selected by the user;
    调色模块,用于当所述调色块从所述色盘的第一位置正向移动到第二位置时,根据所述调色块移动的位置增量调和第一颜色和所述第二颜色,以得到所述第二位置对应的颜色,所述第一颜色为所述第一位置对应的颜色。a color modulating module, configured to reconcile the first color and the second according to a position increment of the toner patch movement when the toner patch moves from the first position to the second position of the color wheel a color to obtain a color corresponding to the second position, the first color being a color corresponding to the first position.
  7. 如权利要求6所述的色盘,其特征在于,所述调色模块包括:The color wheel of claim 6 wherein said color correction module comprises:
    第一计算模块,用于计算第一颜色的R、G、B值分别与所述第二颜色的R、G、B值的差值,得到R、G、B差量值;a first calculating module, configured to calculate a difference between the R, G, and B values of the first color and the R, G, and B values of the second color to obtain a difference value of R, G, and B;
    第二计算模块,用于计算所述调色块移动的位置增量,并计算所述位置增量和预设位置增量的比值;a second calculating module, configured to calculate a position increment of the color block movement, and calculate a ratio of the position increment to a preset position increment;
    第三计算模块,用于根据所述比值和所述R、G、B差量值计算所述第二位置对应的颜色的R、G、B值;a third calculating module, configured to calculate, according to the ratio and the R, G, and B difference values, R, G, and B values of colors corresponding to the second position;
    选取模块,用于选取所述第二位置对应的颜色。The module is selected to select a color corresponding to the second location.
  8. 如权利要求7所述的色盘,其特征在于,所述第二位置对应的颜色的R、G、B值的计算公式为: The color wheel according to claim 7, wherein the calculation formula of the R, G, and B values of the color corresponding to the second position is:
    当Δd≤D时,
    Figure PCTCN2017103773-appb-100003
    When Δd ≤ D,
    Figure PCTCN2017103773-appb-100003
    当Δd>D时,
    Figure PCTCN2017103773-appb-100004
    When Δd>D,
    Figure PCTCN2017103773-appb-100004
    其中,r、g、b分别为所述第二位置对应颜色的R、G、B值,r1、g1、b1分别为所述第一颜色的R、G、B值,r2、g2、b2分别为所述第二颜色的R、G、B值,Δr、Δg、Δb分别为所述R、G、B差量值,Δd为所述调色块从所述第一位置移动到所述色盘的第二位置时的位置增量,D为所述预设位置增量。Wherein r, g, and b are R, G, and B values respectively corresponding to the color of the second position, and r 1 , g 1 , and b 1 are respectively R, G, and B values of the first color, r 2 , g 2 and b 2 are respectively R, G, and B values of the second color, and Δr, Δg, and Δb are the R, G, and B difference values, respectively, and Δd is the color block from the first The position increment when the position is moved to the second position of the color wheel, and D is the preset position increment.
  9. 一种可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-5中任意一项所述的方法的步骤。A readable storage medium having stored thereon a computer program, characterized in that the program, when executed by a processor, implements the steps of the method of any of claims 1-5.
  10. 一种计算机设备,包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实现如权利要求1-5中任意一项所述的方法的步骤。 A computer device comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein the processor executes the program to implement any one of claims 1-5 The steps of the method described.
PCT/CN2017/103773 2017-07-01 2017-09-27 Palette, color blending method, readable storage medium, and computer apparatus WO2019006893A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710528474.7 2017-07-01
CN201710528474.7A CN107450873B (en) 2017-07-01 2017-07-01 Color wheel, color matching method, readable storage medium and computer device

Publications (1)

Publication Number Publication Date
WO2019006893A1 true WO2019006893A1 (en) 2019-01-10

Family

ID=60487668

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/103773 WO2019006893A1 (en) 2017-07-01 2017-09-27 Palette, color blending method, readable storage medium, and computer apparatus

Country Status (2)

Country Link
CN (1) CN107450873B (en)
WO (1) WO2019006893A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113973414A (en) * 2020-07-23 2022-01-25 青岛海尔智能家电科技有限公司 Method, device and equipment for color synchronous display

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101321228A (en) * 2007-06-06 2008-12-10 富士施乐株式会社 Color adjustment apparatus, computer-readable medium and color adjustment method
CN102541485A (en) * 2010-10-13 2012-07-04 普驰信息技术有限公司 Color selection graphical user interface
CN102781135A (en) * 2011-05-13 2012-11-14 君曜科技股份有限公司 Method and system for coding palette
CN105657391A (en) * 2016-01-04 2016-06-08 京东方科技集团股份有限公司 Image processing method and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI270299B (en) * 2005-10-13 2007-01-01 Weltrend Semiconductor Inc Method for adjusting hue or saturation of an individual color in a divided color space
KR20110096621A (en) * 2010-02-23 2011-08-31 삼성전자주식회사 Method and apparatus for generating color information
US20110292069A1 (en) * 2010-05-28 2011-12-01 Witt David Joseph RGB Color Mixer
JP2014121021A (en) * 2012-12-18 2014-06-30 Canon Inc Color processing device and method
CN103428512B (en) * 2013-07-30 2016-05-04 京东方科技集团股份有限公司 A kind of rgb signal is to image conversion method and the device of RGBY signal
CN106780648B (en) * 2016-12-15 2018-11-13 北京金山软件有限公司 A kind of dynamic mapping method and device of color of image

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101321228A (en) * 2007-06-06 2008-12-10 富士施乐株式会社 Color adjustment apparatus, computer-readable medium and color adjustment method
CN102541485A (en) * 2010-10-13 2012-07-04 普驰信息技术有限公司 Color selection graphical user interface
CN102781135A (en) * 2011-05-13 2012-11-14 君曜科技股份有限公司 Method and system for coding palette
CN105657391A (en) * 2016-01-04 2016-06-08 京东方科技集团股份有限公司 Image processing method and device

Also Published As

Publication number Publication date
CN107450873B (en) 2020-09-04
CN107450873A (en) 2017-12-08

Similar Documents

Publication Publication Date Title
US9495087B2 (en) Two-dimensional slider control
US10380769B1 (en) Arrangement of drawing objects along arbitrary paths
US11087503B2 (en) Interactive color palette interface for digital painting
US9202431B2 (en) Transfusive image manipulation
US8042039B2 (en) Populating a dynamic page template with digital content objects according to constraints specified in the dynamic page template
CN107230239A (en) Pattern drawing method, device and equipment
CN107248192A (en) Solid figure method for drafting, device, equipment and storage medium
WO2019006893A1 (en) Palette, color blending method, readable storage medium, and computer apparatus
US20120313870A1 (en) Information processing apparatus, program, and information processing method
US20210390744A1 (en) Shape Joining based on Proximity
WO2019006892A1 (en) Palette, two-color rendering method, color acquisition method, readable storage medium, and computer
WO2016204241A1 (en) Image processing device, image processing method, program, and recording medium
US11436734B2 (en) Directional digital paint application
WO2018149258A1 (en) Data graphical display method, device, computing apparatus and computer readable storage medium
US20210374903A1 (en) Method and system for image registration using regional warping
CN111767700B (en) Graph adjustment method and device
JP7378865B1 (en) Method and program for generating images of three-dimensional objects
JP6467257B2 (en) Information processing apparatus, information processing method, and program
CA2972449C (en) Display of intensity profile discs
CN110648381A (en) Character string display method and device, terminal equipment and storage medium
Harder et al. Placing Your Artwork into Illustrator
US8890885B1 (en) Efficiently copying and blending a source region into a target region
Jackson et al. The Foundation of Digital Painting: Canvas and Brush
WO2023149896A1 (en) Digital image surface editing with user-selected color
GB2538733A (en) Control system for media manipulation

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17916809

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 13.05.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 17916809

Country of ref document: EP

Kind code of ref document: A1