WO2019006892A1 - 色盘、双色渲染方法、取色方法、可读存储介质及计算机 - Google Patents

色盘、双色渲染方法、取色方法、可读存储介质及计算机 Download PDF

Info

Publication number
WO2019006892A1
WO2019006892A1 PCT/CN2017/103772 CN2017103772W WO2019006892A1 WO 2019006892 A1 WO2019006892 A1 WO 2019006892A1 CN 2017103772 W CN2017103772 W CN 2017103772W WO 2019006892 A1 WO2019006892 A1 WO 2019006892A1
Authority
WO
WIPO (PCT)
Prior art keywords
color
block
position point
increment
current position
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/CN2017/103772
Other languages
English (en)
French (fr)
Inventor
李幸斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
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 Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shirui Electronics Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Publication of WO2019006892A1 publication Critical patent/WO2019006892A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • G06F3/1407General aspects irrespective of display type, e.g. determination of decimal point position, display with fixed or driving decimal point, suppression of non-significant zeros

Definitions

  • the present invention relates to the field of color processing, and in particular to a color wheel, a two-color rendering method, a color picking method, a readable storage medium, and a computer.
  • 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.
  • a variety of colors are preset on the existing color palette, and the user only needs to select one of the colors on the color palette.
  • the existing color palettes exhibit limited color, and generally require the user to adjust the R, G, B values or H, S, L values to change the color.
  • R, G, B values or H, S, and L values of the color it is necessary to try multiple times to get the desired color.
  • the color adjustment method is single and it is not possible to quickly obtain the desired color.
  • the present invention provides a two-color rendering method for a color wheel, wherein the color wheel is provided with a color grading block, and the two-color rendering method includes:
  • a circle is drawn with the current position point where the color block is located as a circle, a circular area is formed, and the circular area is filled with a target color corresponding to the current position point.
  • the above two-color rendering method wherein the calculating is performed according to a position increment of the toner patch movement
  • the step of increasing the color of the first color to the second color to obtain the target color corresponding to each position point of the moving block of the moving block includes:
  • r, g, and b are the R, G, and B values of the color corresponding to the current position point
  • r 1 , g 1 , and b 1 are the 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 toner block from the initial position.
  • the position increment when moving to the current position point, and D is the preset position increment.
  • the above-mentioned two-color rendering method after the step of filling the circular area with the target color corresponding to the current position point, the method further includes:
  • the above two-color rendering method wherein the color palette is rotated around the origin of the color wheel when moving, and the step of calculating the position increment when the color block is moved from the initial position to the current position includes:
  • the angle between adjacent vectors between the initial position and the current position point is cumulatively calculated to obtain a position increment when the toner patch moves from the initial position to the current position point.
  • the above-described two-color rendering method wherein the step of forming a circle with the current position point where the color block is located as a center, forming a circular area, and filling the circular area with a target color corresponding to the current position point includes :
  • a circle is drawn with the current position point as a center, a circular area is formed, and a circular area corresponding to the current position point is filled with the target color.
  • the present invention also provides a color picking method, wherein the application to the color wheel includes:
  • the color of the circular area of the position point corresponding to the coordinates on the color wheel is selected.
  • 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 first color corresponding to the initial position of the color patch at the initial position of the color wheel and acquire a second color selected by the user when the color block is moving forward on the color wheel ;
  • a calculation module configured to traverse each position point of the movement trajectory of the color block, and calculate a color increment of the first color to the second color change according to a position increment of the color block movement, Obtaining a target color corresponding to each position point of the moving block of the moving trajectory;
  • the first filling module draws a circle with the current position point of the color block as a circle, forms a circular area, and fills the circular area with a target color corresponding to the current position point.
  • calculation block comprises:
  • a first calculation sub-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 calculation submodule configured to calculate the color block to move from the initial position to a current position Position increment
  • a third calculating submodule configured to calculate a ratio of the position increment and the preset position increment, and calculate R, G, and B values of the target color according to the ratio and the R, G, and B difference values.
  • r, g, and b are the R, G, and B values of the color corresponding to the current position point
  • r 1 , g 1 , and b 1 are the 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 toner block from the initial position.
  • the position increment when moving to the current position point, and D is the preset position increment.
  • the above color wheel also includes:
  • a second filling module configured to determine a color corresponding to a position point of the color grading block on the moving trajectory when the color grading block is reversely moved, and fill the color grading block with the corresponding color The position of the point corresponds to the circular area.
  • the second calculation sub-module includes:
  • a coordinate acquisition module configured to acquire coordinates of each position point of the movement trajectory of the color grading block, and obtain a vector of coordinates of the origin point to each position point of the movement trajectory;
  • the angle calculation module is configured to cumulatively calculate an angle between adjacent positions between the initial position and the current position point to obtain a position increment when the color block moves from the initial position to the current position point.
  • the above color wheel also includes:
  • a signal acquisition module configured to determine a coordinate of a click position when a click signal is acquired, and Moving the color block to a position corresponding to the coordinate on the color wheel;
  • a color selection module configured to select a color of a circular area of the position point corresponding to the coordinate on 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.
  • the present invention also provides a computer comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, the processor executing the program to implement the steps of the method.
  • the user may use the color of the circular area of any position point where the color block is located as the first color, and obtain the user selected color as the second color, and control the color of the color wheel by moving the color adjustment block. It varies between the first color and the second color. It is convenient for the user to debug the color by himself, get a color-changing color palette, and quickly get the desired color.
  • FIG. 1 is a flowchart of a two-color rendering method in a first embodiment of the present invention
  • FIG. 2 is a flowchart of a two-color rendering method in a second embodiment of the present invention.
  • FIG. 3 is a flowchart of a two-color rendering method in a third embodiment of the present invention.
  • FIG. 4 is a flow chart of a color picking method in a fourth embodiment of the present invention.
  • Figure 5 is a block diagram showing the structure of a color wheel in a fifth embodiment of the present invention.
  • FIG. 6 is a structural block diagram of the calculation module of FIG. 5.
  • 1 is a two-color rendering method of a color wheel in a first embodiment of the present invention, comprising steps S11-S13, wherein the color wheel is provided with a color block, and the color block can be moved on the color wheel.
  • the user can drag the color block by dragging the mouse or touching the display screen.
  • Step S11 When the color block is moving forward on the color wheel, acquire a first color corresponding to the initial position of the color block and obtain a second color selected by the user.
  • the first color is a color corresponding to the starting position point when the toner patch moves on the color wheel.
  • 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 traversing each position point of the movement trajectory of the color block, calculating a color increment of the first color to the second color change according to the position increment of the color block movement, to obtain a The target color corresponding to each position point of the moving track is described.
  • the color increment of the color change of the first color to the second color is calculated according to the position increment of the color block movement, and the color increment is the degree of color change.
  • the position increment when the movement trajectory of the toner patch is completely changed from the first color color to the color gradation of the second color is D
  • the position increment corresponding to the current position point according to the movement trajectory of the toner patch and D The ratio calculates a color increment of the color change of the first color to the second color to obtain a target color corresponding to the current position point.
  • Step S13 drawing a circle with the current position point where the color block is located as a center, forming a circular area, and filling the circular area with a target color corresponding to the current position point.
  • a circle is drawn with the current position point as a circle, and a circular area is formed, and the target color corresponding to the current position point is filled in the circular area where the current position point is a center.
  • the moving trajectory of the color grading block can be rendered as a color gradation from the first color to the second color. Thereby, the color between the first color and the second color is obtained from the rendered color wheel.
  • the user may use the color of the circular area of any position point where the color block is located as the first color, and obtain the color selected by the user as the second color, and control the color of the color wheel by moving the color adjustment block. It varies between the first color and the second color. It is convenient for users to debug colors and get colors Change the colorful color palette.
  • the two-color rendering method of the color wheel includes steps S21 to S25.
  • Step S21 when the color block is moving forward on the color wheel, acquire a first color corresponding to the initial position of the color block and obtain a second color selected by the user.
  • Step S22 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, to obtain R, G, and B difference values.
  • the first color is a color displayed by the corresponding circular area when the toning block is in an initial position of its movement trajectory.
  • 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 traversing each position point of the movement trajectory of the color grading block, and calculating a position increment when the color grading block moves from the initial position to the current position point.
  • the formed moving track includes a plurality of uniformly arranged position points, and each time the color block moves to a position point, the color block is calculated to move from the initial position to The position increment of the current position of the color wheel.
  • Step S24 calculating a ratio of the position increment and the preset position increment, and calculating R, G, and B of the target color corresponding to the current position point according to the ratio and the R, G, and B difference values. value.
  • Step S25 drawing a circle with the current position point as a center, forming a circular area, and filling the circular area with a target color corresponding to the current position point.
  • the R, G, and B values of the target color are calculated according to the ratio and the R, G, and B difference values, and the R, G, and B values of the target color change with the position point at r 1 , g 1 , b 1 and r 2 , g 2 , b 2 vary.
  • a circle is drawn with the current position point of the color block as a center, and the target color is filled in the corresponding circular area, that is, a circular color area rendered with the target color is obtained.
  • a circular area corresponding to one position point of the toner patch moving track is rendered, and a color area which is gradually changed from the first color to the second color is obtained.
  • r, g, and b are R, G, and B values of the target color, respectively, and r 1 , g 1 , and b 1 are R, G, and B values of the first color, respectively, r 2 , g 2 , b 2 is the R, G, and B values of the second color, respectively, ⁇ r, ⁇ g, and ⁇ b are the R, G, and B difference values, respectively, and ⁇ d is the moving block moves from the initial position to the The position increment at the current position point, and D is the preset position increment.
  • the color between the first color and the second color is determined according to the position increment ⁇ d of the toner patch movement.
  • ⁇ d is greater than 0, and the color displayed by the movement track of the toner patch changes from the first color to the second color until ⁇ d is greater than or equal to the position of the toner patch when the preset position increment is greater than or equal to the preset position increment.
  • the circular area corresponding to the point displays the second color.
  • the color between the first color and the second color is calculated by the ratio of the position increment of the toner patch movement to the preset position increment and the difference between the R, G, and B values of the first color and the second color. (including the first color and the second color), and filling the calculated color with a circular area centered at each position point as the color block moves to change from the first color to the second color The color area.
  • FIG. 3 is a two-color rendering method according to a third embodiment of the present invention, including steps S31-S37.
  • the color wheel is provided with a color block, 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, the color block and the color In-disk cutting, the color block moves around the center of the color wheel in the color wheel.
  • Step S31 when the color block is moving forward on the color wheel, acquire a first color corresponding to the initial position of the color block and obtain a second color selected by the user.
  • Step S32 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, to obtain R, G, and B difference values.
  • Step S33 traversing each position point of the movement trajectory when the color grading block is moving forward, acquiring coordinates of each position point of the movement trajectory of the color grading block, and obtaining the origin to the movement trajectory A vector of coordinates for each position point.
  • Step S34 cumulatively calculating an angle between adjacent positions between the initial position and the current position point to obtain a position increment when the color block moves from the initial position to the current position point.
  • Step S35 calculating a ratio of the position increment and the preset position increment, and calculating R, G, and B values of the target color according to the ratio and the R, G, and B difference values.
  • Step S36 drawing a circle with the current position point where the color block is located as a circle, forming a circular area, and filling the circular area with a target color corresponding to the current position point.
  • the circular area is filled with the target color, the circular area is subjected to pixel coloring according to the R, G, and B values of the target color point.
  • 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 initial position to the current position point is calculated.
  • the loop traverses ⁇ , and draws a circle on the palette in units of 1 degree.
  • the circular area drawn is the same as the size of the palette, and the calculated target color at each angle.
  • the current color of the fill palette is the area.
  • the rotation angle of the drawn circle is: InitialAngle+1, InitialAngle+2,...,InitialAngle+ ⁇ . In the initial case, the InitialAngle is 0, and the toning ball is at the top of the center of the palette.
  • the step of forming a circle with the current position point of the color block as a circle, forming a circular area, and filling the circular area with the target color corresponding to the current position point includes:
  • Step S361 determining whether there is a corresponding circular area in the current position point on the color wheel. If the step S362 is performed, otherwise step S363 is performed.
  • Step S362 replacing the color of the circular area corresponding to the current position point with the target color.
  • Step S363 drawing a circle with the current position point as a center, forming a circular area, and filling the circular area corresponding to the current position point with the target color.
  • the coloring effect of the two colors is dragged by a circle of a large amount of the current color of the color palette.
  • the direction is superimposed to form. It is necessary to consider that in the process of mass grading, in order to avoid excessive system memory growth due to frequent color grading, the following methods are avoided:
  • the color palette can be drawn up to 360 circles, that is, each degree on the color wheel forms a circle of the same size as the color palette, which makes the color rendering effect smooth and natural.
  • a dictionary is used to record the circle corresponding to the rotation angle.
  • it is determined whether there is a circular area corresponding to the position point, and a circle is added if it does not exist. If it exists, delete the previous circle and draw the circle filled with the target color.
  • the initial setting of the color wheel can be filled with the default color, such as black, and the color of the original circular area is replaced with the target color when the color block moves.
  • Step S37 when the toning block moves in the reverse direction, determine a color corresponding to a position point of the toning block on the movement track, and fill the position point where the toning block is located with the corresponding color.
  • the circular area when the toning block moves in the reverse direction, determine a color corresponding to a position point of the toning block on the movement track, and fill the position point where the toning block is located with the corresponding color.
  • the process of grading from the second color to the first color is a reverse process of the process of grading the first color to the second color, and the principles of the two colors are the same.
  • the preset position increment is, for example, 720 (degrees), 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 R, G, and B values of the target color are calculated as:
  • r', g', b' are R, G, and B values of colors corresponding to the third position point, respectively, and ⁇ is when the color block moves from the initial position to the second position
  • the angle of rotation, ⁇ ' is the angle from the second position point to the third position point, and is a negative value.
  • the angle of movement of the color grading block is greater than 0, and the color displayed by the movement trajectory of the color grading block changes from the first color to the second color until the angle at which the color grading block moves forward is greater than or
  • the circular area corresponding to the current position is equal to 720°, and the second color is displayed; when the toner patch moves in the reverse direction, the angle of movement of the color block is negative, and the color of the moving track of the color block is filled from the second color to the first color.
  • the color changes until the circular region corresponding to the current position fills the first color until the angle of the reverse movement of the toner patch is greater than or equal to ⁇ . If ⁇ ' is less than -720°, the toner bar can be adjusted to the first color by rotating 720 degrees counterclockwise.
  • a circular color wheel is taken as an example to describe the method of two-color rendering in detail. It can be understood that the shape of the color wheel and the color block is not limited to a circular shape, and may also be a rectangular shape or other shapes.
  • the position increment of the block movement is calculated as the moving distance of the color block.
  • a fourth embodiment of the present invention further provides a color picking method, which is applied to the color wheel in the above embodiment, and includes steps S41-S42:
  • Step S41 when the click signal is acquired, determine the coordinates of the click position, and move the color block Moving to a position point corresponding to the coordinates on the color wheel;
  • Step S42 selecting a color of a circular area corresponding to the position point corresponding to the coordinate on the color wheel.
  • the color block moves around the origin of the circular color disk, and includes a color container containing 360 items to record the color corresponding to each rotation angle.
  • the position coordinates of the mouse are obtained, and the vector currentVector of the center of the palette to the click point is obtained.
  • Calculate the angle ⁇ between the vector originVextor of the initial position and the vector currentVector. If ⁇ is negative, ⁇ 360+ ⁇ . Find the color corresponding to ⁇ in the color container, that is, get the color of the click.
  • the disc is provided with 360 position points in units of 1°, and if the coordinates of the click position are located between the two position points, by determining which position point the click position falls within, Determine the corresponding circular area of the click position. It is convenient for users to quickly select the desired color on the color palette.
  • FIG. 5 is a color wheel in a fifth embodiment of the present invention, wherein the color wheel is provided with a color block, and the color wheel includes:
  • the color obtaining module 10 is configured to acquire a first color corresponding to the initial position of the color patch in the color wheel and obtain a second selected by the user when the color block is moving forward on the color wheel colour;
  • a calculation module 20 configured to traverse each position point of the movement trajectory of the color block, and calculate a color increment of the first color to the second color change according to a position increment of the color block movement, Obtaining a target color corresponding to each position point of the moving block in the moving track;
  • the first filling module 30 draws a circle with the current position point of the color block as a circle, forms a circular area, and fills the circular area with a target color corresponding to the current position point.
  • the present embodiment controls the color of the color wheel to change between the first color and the second color by moving the toner patch. It is convenient for the user to debug the color by himself and get a color palette with a colorful color change.
  • the calculation module 20 includes:
  • a first calculation sub-module 21 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 calculation sub-module 22 configured to calculate the color block to move from the initial position to the current position Position increment at the time of the point;
  • a third calculation sub-module 23 configured to calculate a ratio of the position increment and a preset position increment, and calculate an R, G, and B value of the target color 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 toner block from the initial position.
  • the position increment when moving to the current position point, and D is the preset position increment.
  • the color wheel further includes:
  • a second filling module 40 configured to determine a color corresponding to a position point of the color grading block on the moving trajectory when the color grading block is reversely moved, and fill the color grading block with the corresponding color The circular area corresponding to the location point.
  • the second calculating sub-module 22 includes:
  • a coordinate acquisition module configured to acquire coordinates of each position point of the movement trajectory of the color grading block, and obtain a vector of coordinates of the origin point to each position point of the movement trajectory;
  • An angle calculation module configured to cumulatively calculate an angle between adjacent vectors between the initial position and the current position point, to obtain a position increment when the color block moves from the initial position to the current position point .
  • the color wheel further includes:
  • the signal acquisition module 50 is configured to determine a coordinate of the click position when the click signal is acquired, and move the color block to a position point corresponding to the coordinate on the color wheel;
  • the color selection module 60 is configured to select a color of a circular area of the position point corresponding to the coordinate on the color wheel.
  • the present invention also provides a readable storage medium having stored thereon a computer program, the program being executed by a processor, the steps of any of the above embodiments 1 to 4.
  • the present invention also provides a computer 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 to 4 when the program is executed The steps of the method.
  • the program can be stored in a computer readable storage medium.
  • the program when executed, includes the steps described in the above methods.
  • the storage medium includes: a ROM/RAM, a magnetic disk, an optical disk, and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Processing Or Creating Images (AREA)

Abstract

一种色盘、双色渲染方法、取色方法及可读存储介质、计算机,所述色盘上设有调色块,所述双色渲染方法包括:当所述调色块在所述色盘上正向移动时,获取所述调色块在所述色盘的初始位置对应的第一颜色以及获取用户选择的第二颜色(S11);遍历所述调色块的移动轨迹的每一个位置点,根据所述调色块移动的位置增量计算所述第一颜色向所述第二颜色变化的颜色增量,以得到所述调色块在所述移动轨迹的每个位置点对应的目标颜色(S12);以所述调色块所在的当前位置点为圆心画圆,形成圆形区域,并以所述当前位置点对应的目标颜色填充所述圆形区域(S13)。通过移动调色块调控制色盘的颜色在第一颜色和第二颜色之间变化。

Description

色盘、双色渲染方法、取色方法、可读存储介质及计算机 技术领域
本发明涉及颜色处理领域,特别是涉及一种色盘、双色渲染方法、取色方法、可读存储介质及计算机。
背景技术
目前终端设备如电脑、平板等的取色,一般是通过选取色盘上的颜色来控制显示画面的颜色变化。
现有的色盘上预设多种颜色,用户只需要在色盘上选取其中一种颜色即可。然而,现有的色盘呈现的颜色有限,一般需要用户调节R、G、B值或H、S、L值来改变颜色。而对于不熟悉颜色的R、G、B值或H、S、L值的用户来说,要多次尝试才能得到想要的颜色。其颜色调节方式单一,无法快速获取想要的颜色。
发明内容
鉴于上述状况,有必要针对现有技术中的色盘取色效率低的问题,提供一种色盘、双色渲染方法、取色方法、可读存储介质及计算机。
本发明提供了一种色盘的双色渲染方法,所述色盘上设有调色块,所述双色渲染方法包括:
当所述调色块在所述色盘上正向移动时,获取所述调色块在所述色盘的初始位置对应的第一颜色以及获取用户选择的第二颜色;
遍历所述调色块的移动轨迹的每一个位置点,根据所述调色块移动的位置增量计算所述第一颜色向所述第二颜色变化的颜色增量,以得到所述调色块在所述移动轨迹的每个位置点对应的目标颜色;
以所述调色块所在的当前位置点为圆心画圆,形成圆形区域,并以所述当前位置点对应的目标颜色填充所述圆形区域。
上述双色渲染方法,其中,所述根据所述调色块移动的位置增量计算所述 第一颜色向所述第二颜色变化的颜色增量,以得到所述调色块在所述移动轨迹的每个位置点对应的目标颜色的步骤包括:
计算第一颜色的R、G、B值分别与所述第二颜色的R、G、B值的差值,得到R、G、B差量值;
计算所述调色块从所述初始位置移动到当前位置点时的位置增量;
计算所述位置增量和预设位置增量的比值,并根据所述比值和所述R、G、B差量值计算所述当前位置点对应的目标颜色的R、G、B值。
上述双色渲染方法,其中,所述目标颜色的R、G、B值的计算公式为:
当Δd≤D时,
Figure PCTCN2017103772-appb-000001
当Δd>D时,
Figure PCTCN2017103772-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为所述预设位置增量。
上述双色渲染方法,其中,所述以所述当前位置点对应的目标颜色填充所述圆形区域的步骤之后还包括:
当所述调色块逆向移动时,确定所述移动轨迹上所述调色块所在的位置点对应的颜色,并以所述对应的颜色填充所述调色块所在的位置点对应的圆形区域。
上述双色渲染方法,其中,所述调色块移动时绕所述色盘的原点旋转,所述计算所述调色块从所述初始位置移动到当前位置点时的位置增量的步骤包括:
获取所述调色块的移动轨迹的每一个位置点的坐标,并得到所述原点到所述移动轨迹的每一个位置点的坐标的向量;
累计计算所述初始位置与当前位置点之间相邻的向量的夹角,以得到所述调色块从所述初始位置移动到所述当前位置点时的位置增量。
上述双色渲染方法,其中,所述色块的移动轨迹的相邻的位置点间隔1°。
上述双色渲染方法,其中,所述以所述调色块所在的当前位置点为圆心画圆,形成圆形区域,并以所述当前位置点对应的目标颜色填充所述圆形区域的步骤包括:
判断所述色盘上所述调色块所在的当前位置点是否存在对应的圆形区域;
若是,将所述当前位置点对应的圆形区域的颜色替换为所述目标颜色;
若否,则以所述当前位置点为圆心画圆,形成圆形区域,并以所述目标颜色填充所述当前位置点对应的圆形区域。
本发明还提供一种取色方法,其中,应用于上述色盘中,包括:
当获取到点击信号时,确定点击位置的坐标,并将所述调色块移动到所述色盘上所述坐标对应的位置点;
选取所述色盘上所述坐标对应的位置点的圆形区域的颜色。
本发明还提供了一种色盘,所述色盘上设有调色块,所述色盘包括:
颜色获取模块,用于当所述调色块在所述色盘上正向移动时,获取所述调色块在所述色盘的初始位置对应的第一颜色以及获取用户选择的第二颜色;
计算模块,用于遍历所述调色块的移动轨迹的每一个位置点,根据所述调色块移动的位置增量计算所述第一颜色向所述第二颜色变化的颜色增量,以得到所述调色块在所述移动轨迹的每个位置点对应的目标颜色;
第一填充模块,以所述调色块所在的当前位置点为圆心画圆,形成圆形区域,并以所述当前位置点对应的目标颜色填充所述圆形区域。
上述色盘,其中,所述计算块包括:
第一计算子模块,用于计算第一颜色的R、G、B值分别与所述第二颜色的R、G、B值的差值,得到R、G、B差量值;
第二计算子模块,用于计算所述调色块从所述初始位置移动到当前位置点 时的位置增量;
第三计算子模块,用于计算所述位置增量和预设位置增量的比值,并根据所述比值和所述R、G、B差量值计算目标颜色的R、G、B值。
上述色盘,其中,所述目标颜色的R、G、B值的计算公式为:
当Δd≤D时,
Figure PCTCN2017103772-appb-000003
当Δd>D时,
Figure PCTCN2017103772-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为所述预设位置增量。
上述色盘,还包括:
第二填充模块,用于当所述调色块逆向移动时,确定所述移动轨迹上所述调色块所在的位置点对应的颜色,并以所述对应的颜色填充所述调色块所在的位置点对应的圆形区域。
上述色盘,其中,所述调色块移动时绕所述色盘的原点旋转,所述第二计算子模块包括:
坐标获取模块,用于获取所述调色块的移动轨迹的每一个位置点的坐标,并得到所述原点到所述移动轨迹的每一个位置点的坐标的向量;
角度计算模块,用于累计计算所述初始位置与当前位置点之间相邻向量的夹角,以得到所述调色块从所述初始位置移动到所述当前位置点时的位置增量。
上述色盘,还包括:
信号获取模块,用于当获取到点击信号时,确定点击位置的坐标,并将所 述调色块移动到所述色盘上所述坐标对应的位置点;
颜色选择模块,用于选取所述色盘上所述坐标对应的位置点的圆形区域的颜色。
本发明还提供了一种可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述方法的步骤。
本发明还提供了一种计算机,包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现上述方法的步骤。
本发明实施例中,用户可以以调色块所在的任意一位置点的圆形区域的颜色作为第一颜色,并获取用户选择颜色作为第二颜色,通过移动调色块调控制色盘的颜色在第一颜色和第二颜色之间变化。方便用户自行调试颜色,得到颜色变化多彩的色盘,并快速得到想要的颜色。
附图说明
图1为本发明第一实施例中的双色渲染方法流程图;
图2为本发明第二实施例中的双色渲染方法流程图;
图3为本发明第三实施例中的双色渲染方法流程图;
图4为本发明第四实施例中取色方法流程图;
图5为本发明第五实施例中的色盘的结构框图;
图6为图5中计算模块的结构框图。
具体实施方式
下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本发明,而不能理解为对本发明的限制。
参照下面的描述和附图,将清楚本发明的实施例的这些和其他方面。在这些描述和附图中,具体公开了本发明的实施例中的一些特定实施方式,来表示 实施本发明的实施例的原理的一些方式,但是应当理解,本发明的实施例的范围不受此限制。相反,本发明的实施例包括落入所附加权利要求书的精神和内涵范围内的所有变化、修改和等同物。
请参阅图1为本发明第一实施例中的色盘的双色渲染方法,包括步骤S11~S13,所述色盘上设有调色块,所述调色块可在所述色盘上移动,例如用户可通过拖动鼠标或触摸显示屏的方式拖动所述调色块。
步骤S11,当所述调色块在所述色盘上正向移动时,获取所述调色块在所述色盘的初始位置对应的第一颜色以及获取用户选择的第二颜色。第一颜色为所述调色块在色盘上移动时,起始位置点对应的颜色。所述色盘上可以预设多个的标准颜色,用户通过鼠标或触摸选择其中一个颜色作为第二颜色。
步骤S12,遍历所述调色块的移动轨迹的每一个位置点,根据所述调色块移动的位置增量计算所述第一颜色向所述第二颜色变化的颜色增量,以得到所述调色块在所述移动轨迹的每个位置点对应的目标颜色。
用户移动所述调色块时,根据调色块移动的位置增量计算所述第一颜色向所述第二颜色的颜色变化的颜色增量,该颜色增量即为颜色变化的程度。如,调色块的移动轨迹从第一颜色颜色完全变化为第二颜色的调色块时的位置增量为D,根据调色块的移动轨迹的当前位置点对应的位置增量与D的比值计算第一颜色向第二颜色的颜色变化的颜色增量,以得到当前位置点对应的目标颜色。
步骤S13,以所述调色块所在的当前位置点为圆心画圆,形成圆形区域,并以所述当前位置点对应的目标颜色填充所述圆形区域。
确定当前位置点对应的目标颜色后,以所述当前位置点为圆心画圆,形成圆形区域,并将当前位置点对应的目标颜色填充在所述当前位置点为圆心的圆形区域中。遍历调色块移动轨迹的每一个位置点,即可将调色块的移动轨迹渲染为从第一颜色向第二颜色渐变的色带。由此,从该渲染后的色盘上可得到第一颜色和第二颜色之间的颜色。
本实施例中,用户可以以调色块所在的任意一位置点的圆形区域的颜色作为第一颜色,并获取用户选择的颜色作为第二颜色,通过移动调色块调控制色盘的颜色在第一颜色和第二颜色之间变化。方便用户自行调试颜色,得到颜色 变化多彩的色盘。
请参阅图2为本发明第二实施例中的色盘,所述色盘上设有调色块,所述调色块可在所述色盘上移动,例如用户可通过拖动鼠标或触摸显示屏的方式拖动所述调色移动。所述色盘的双色渲染方法包括步骤S21~S25。
步骤S21,当所述调色块在所述色盘上正向移动时,获取所述调色块在所述色盘的初始位置对应的第一颜色以及获取用户选择的第二颜色。
步骤S22,计算第一颜色的R、G、B值分别与所述第二颜色的R、G、B值的差值,得到R、G、B差量值。所述第一颜色为所述调色块在其移动轨迹的初始位置时,对应的圆形区域显示的颜色。R、G、B差量值Δr、Δg和Δb的计算公式如下:
Δr=r2-r1
Δg=g2-g1
Δb=b2-b1
其中,r1、g1、b1分别为所述第一颜色的R、G、B值,r2、g2、b2分别为所述第二颜色的R、G、B值。
步骤S23,遍历所述调色块的移动轨迹的每一个位置点,计算所述调色块从所述初始位置移动到当前位置点时的位置增量。
所述调色块在色盘上移动时,形成的移动轨迹上包含多个均匀设置的位置点,调色块每移动到一个位置点时,计算所述调色块从所述初始位置移动到所述色盘的当前位置点时的位置增量。
步骤S24,计算所述位置增量和预设位置增量的比值,并根据所述比值和所述R、G、B差量值计算所述当前位置点对应的目标颜色的R、G、B值。
步骤S25,以所述当前位置点为圆心画圆,形成圆形区域,并以所述当前位置点对应的目标颜色填充所述圆形区域。
上述步骤中,根据所述比值和所述R、G、B差量值计算目标颜色的R、G、B值,所述目标颜色的R、G、B值随着位置点的变化在r1、g1、b1和r2、g2、b2之间变化。以调色块的当前位置点为圆心画圆,将目标颜色填充在对应的圆形区域中,即得到用目标颜色渲染的圆形颜色区域。通过该方法对调色块移动轨 迹一个位置点对应的圆形区域进行渲染,得到从第一颜色向第二颜色渐变的颜色区域。
具体的,所述调色块正向移动时,所述目标颜色的R、G、B值的计算公式为:
当Δd≤D时,
Figure PCTCN2017103772-appb-000005
当Δd>D时,
Figure PCTCN2017103772-appb-000006
其中,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为所述预设位置增量。
根据调色块移动的位置增量Δd确定第一颜色和第二颜色之间的颜色。当所述调色块正向移动时,Δd大于0,调色块的移动轨迹显示的颜色从第一颜色向第二颜色变化,直到Δd大于或等于预设位置增量时调色块所在位置点对应的圆形区域显示第二颜色。
本实施例通过调色块移动的位置增量和预设位置增量的比值以及第一颜色和第二颜色的R、G、B值差值,计算第一颜色和第二颜色之间的颜色(包含第一颜色和第二颜色),并将计算出来的颜色填充以每个位置点为圆心的圆形区域随着调色块的移动使色盘上形成从第一颜色向第二颜色变化的颜色区域。
请参阅图3,为本发明第三实施例中的双色渲染方法,包括步骤S31~S37。所述色盘上设有调色块,所述色盘和所述调色块均为圆形,所述调色块的直径等于所述色盘的半径,所述调色块与所述色盘内切,所述调色块在所述色盘绕所述色盘的圆心移动。
步骤S31,当所述调色块在所述色盘上正向移动时,获取所述调色块在所述色盘的初始位置对应的第一颜色以及获取用户选择的第二颜色。
步骤S32,计算第一颜色的R、G、B值分别与所述第二颜色的R、G、B值的差值,得到R、G、B差量值。
步骤S33,遍历所述调色块正向移动时的移动轨迹的每一个位置点,获取所述调色块的移动轨迹的每一个位置点的坐标,并得到所述原点到所述移动轨迹的每一个位置点的坐标的向量。
步骤S34,累计计算所述初始位置与当前位置点之间相邻向量的夹角,以得到所述调色块从所述初始位置移动到所述当前位置点时的位置增量。
步骤S35,计算所述位置增量和预设位置增量的比值,并根据所述比值和所述R、G、B差量值计算目标颜色的R、G、B值。
步骤S36,以所述调色块所在的当前位置点为圆心画圆,形成圆形区域,并以所述当前位置点对应的目标颜色填充所述圆形区域。以目标颜色填充所述圆形区域时,根据所述目标颜色点的R、G、B值对圆形区域进行像素点着色。
上述步骤中,调色块移动的位置增量为旋转的角度,即,计算从调色块在初始位置移动至当前位置点时旋转的角度θ。在调色块拖动过程中,循环遍历θ,以1度为单位,在调色盘上画圆,所画的圆形区域与调色块大小相同,以每个角度下的计算的目标颜色填充调色盘当前颜色为区域。所画圆的旋转角度为:InitialAngle+1,InitialAngle+2,...,InitialAngle+θ,初始情况下,InitialAngle(初始角)为0,调色小球在调色盘的居中最上方。
上述步骤中,所述以所述调色块所在的当前位置点为圆心画圆,形成圆形区域,并以所述当前位置点对应的目标颜色填充所述圆形区域的步骤包括:
步骤S361,判断所述色盘上所述当前位置点是否存在对应的圆形区域,若是执行步骤S362,否则执行步骤S363。
步骤S362,将所述当前位置点对应的圆形区域的颜色替换为所述目标颜色。
步骤S363,以当前位置点为圆心画圆,形成圆形区域,并以所述目标颜色填充所述当前位置点对应的圆形区域。
本实施例中,两种颜色的调色效果通过大量填充调色盘当前色的圆沿拖动 方向叠加形成。需要考虑在大量调色过程中,为避免因为频繁调色导致系统内存增长过多,采取下述方法避免:
确保调色块移动时可最多画360个圆,即色盘上的每一度形成一个与调色块相同大小的圆,使调色渲染效果平滑,自然。具体的采用一个字典记录旋转角度对应的圆,旋转过程中,判断是否存在这个位置点对应的圆形区域,不存在就添加圆。存在的话就删除之前的圆,再画上目标颜色填充的圆。当然色盘初始设置时可填充默认颜色,如黑色,调色块移动时用目标颜色替换原来圆形区域的颜色。
步骤S37,当所述调色块逆向移动时,确定所述移动轨迹上所述调色块所在的位置点对应的颜色,并以所述对应的颜色填充所述调色块所在的位置点对应的圆形区域。
其中,从第二颜色向第一颜色渐变的过程是第一颜色向第二颜色渐变的过程的逆向过程,两种颜色调和的原理相同。
所述预设位置增量例如为720(度),即将R、G、B三个颜色通道的差量值均分为720份,得到每一份的值为Δr/720、Δg/720、Δb/720。当所述调色块正向移动,即顺时针转动时,所述目标颜色的R、G、B值的计算公式为:
当θ≤720°时,
Figure PCTCN2017103772-appb-000007
当θ>720°时,
Figure PCTCN2017103772-appb-000008
当所述调色块逆时针从所述当前位置点移动到下一位置点时,即从第二位置点移动到第三位置点时,所述第三位置点对应的颜色的R、G、B值的计算公式为:
当-720≤θ’≤0,且θ≤720时,
Figure PCTCN2017103772-appb-000009
当-720≤θ’≤0,且θ>720时,
Figure PCTCN2017103772-appb-000010
当θ’<-720时,
Figure PCTCN2017103772-appb-000011
其中,r’、g’、b’分别为所述第三位置点对应的颜色的R、G、B值,θ为所述调色块从所述初始位置移动到所述第二位置点时旋转的角度,θ’为从第二位置点逆时针移动到第三位置点时的角度,为负值。
当所述调色块正向移动时,调色块移动的角度大于0,调色块的移动轨迹显示的颜色从第一颜色向第二颜色变化,直到调色块正向移动的角度大于或等于720°时当前位置对应的圆形区域显示第二颜色;当调色块逆向移动时,调色块移动的角度为负值,调色块的移动轨迹填充的颜色从第二颜色向第一颜色变化,直到调色块逆向移动的角度大于或等于θ时当前位置对应的圆形区域填充第一颜色。若θ’小于-720°时,按-720计算,调色块只需逆时针旋转720度即可调到第一颜色。
本实施例以圆形的色盘为例,详细说明了双色渲染的方法,可以理解的,所述色盘和所述色块的形状不限于圆形,也可以为矩形或其他形状,调色块移动的位置增量以调色块的移动路程来计算。
请参阅图4,本发明第四实施例还提供了一种取色方法,应用于上述实施例中的色盘中,包括步骤S41~S42:
步骤S41当获取到点击信号时,确定点击位置的坐标,并将所述调色块移 动到所述色盘上所述坐标对应的位置点;
步骤S42,选取所述色盘上所述坐标对应的位置点对应的圆形区域的颜色。
用可通过鼠标点击色盘上的任意位置点时,获取鼠标的点击位置的坐标,将调色块移动到所述坐标对应的位置点,并选取所述坐标对应的位置点的圆形区域的颜色。
以圆形色盘为例,调色块绕圆形色盘的原点移动,其包括一个包含360项的颜色容器,以记录每一个旋转角度对应的颜色。当鼠标点击时,获取鼠标的位置坐标,得到调色盘圆心到点击点的向量currentVector。计算初始位置的向量originVextor和向量currentVector的夹角β,如果β为负,则β=360+β。在颜色容器中找对应β的颜色,即得到点击处的颜色。本实施例中所述圆盘以1°为单位设置360个位置点,若点击位置的坐标位于两个位置点之间时,通过判断点击位置落在哪一个位置点所限定的范围内,以确定点击位置所述对应的圆形区域。方便用户在色盘上快速的选择需要的颜色。
请参阅图5,为本发明第五实施例中的色盘,所述色盘上设有调色块,所述色盘包括:
颜色获取模块10,用于当所述调色块在所述色盘上正向移动时,获取所述调色块在所述色盘的初始位置对应的第一颜色以及获取用户选择的第二颜色;
计算模块20,用于遍历所述调色块的移动轨迹的每一个位置点,根据所述调色块移动的位置增量计算所述第一颜色向所述第二颜色变化的颜色增量,以得到所述调色块在所述移动轨迹的每个位置点对应的目标颜色;
第一填充模块30,以所述调色块所在的当前位置点为圆心画圆,形成圆形区域,并以所述当前位置点对应的目标颜色填充所述圆形区域。
本实施例通过移动调色块调控制色盘的颜色在第一颜色和第二颜色之间变化。方便用户自行调试颜色,得到颜色变化多彩的色盘。
进一步的,如图6所示,所述计算模块20包括:
第一计算子模块21,用于计算第一颜色的R、G、B值分别与所述第二颜色的R、G、B值的差值,得到R、G、B差量值;
第二计算子模块22,用于计算所述调色块从所述初始位置移动到当前位置 点时的位置增量;
第三计算子模块23,用于计算所述位置增量和预设位置增量的比值,并根据所述比值和所述R、G、B差量值计算目标颜色的R、G、B值。
进一步的,所述目标颜色的R、G、B值的计算公式为:
当Δd≤D时,
Figure PCTCN2017103772-appb-000012
当Δd>D时,
Figure PCTCN2017103772-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为所述预设位置增量。
进一步的,所述色盘还包括:
第二填充模块40,用于当所述调色块逆向移动时,确定所述移动轨迹上所述调色块所在的位置点对应的颜色,并以所述对应的颜色填充所述调色块所在的位置点对应的圆形区域。
进一步的,所述调色块移动时绕所述色盘的原点旋转,所述第二计算子模块22包括:
坐标获取模块,用于获取所述调色块的移动轨迹的每一个位置点的坐标,并得到所述原点到所述移动轨迹的每一个位置点的坐标的向量;
角度计算模块,用于累计计算所述初始位置与当前位置点之间相邻的向量的夹角,以得到所述调色块从所述初始位置移动到所述当前位置点时的位置增量。
进一步的,所述色盘还包括:
信号获取模块50,用于当获取到点击信号时,确定点击位置的坐标,并将所述调色块移动到所述色盘上所述坐标对应的位置点;
颜色选择模块60,用于选取所述色盘上所述坐标对应的位置点的圆形区域的颜色。
本发明还提供了一种可读存储介质,其上存储有计算机程序,该程序被处理器执行时上述实施例1至4中任意一个方法的步骤。
本发明还提供了一种计算机,包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现上述实施例1至4中的任意一个方法的步骤。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成。所述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,包括上述方法所述的步骤。所述的存储介质,包括:ROM/RAM、磁碟、光盘等。
以上所述实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。

Claims (10)

  1. 一种色盘的双色渲染方法,其特征在于,所述色盘上设有调色块,所述双色渲染方法包括:
    当所述调色块在所述色盘上正向移动时,获取所述调色块在所述色盘的初始位置对应的第一颜色以及获取用户选择的第二颜色;
    遍历所述调色块的移动轨迹的每一个位置点,根据所述调色块移动的位置增量计算所述第一颜色向所述第二颜色变化的颜色增量,以得到所述调色块在所述移动轨迹的每个位置点对应的目标颜色;
    以所述调色块所在的当前位置点为圆心画圆,形成圆形区域,并以所述当前位置点对应的目标颜色填充所述圆形区域。
  2. 如权利要求1所述的双色渲染方法,其特征在于,所述根据所述调色块移动的位置增量计算所述第一颜色向所述第二颜色变化的颜色增量,以得到所述调色块在所述移动轨迹的每个位置点对应的目标颜色的步骤包括:
    计算第一颜色的R、G、B值分别与所述第二颜色的R、G、B值的差值,得到R、G、B差量值;
    计算所述调色块从所述初始位置移动到当前位置点时的位置增量;
    计算所述位置增量和预设位置增量的比值,并根据所述比值和所述R、G、B差量值计算所述当前位置点对应的目标颜色的R、G、B值。
  3. 如权利要求2所述的双色渲染方法,其特征在于,所述目标颜色的R、G、B值的计算公式为:
    当Δd≤D时,
    Figure PCTCN2017103772-appb-100001
    当Δd>D时,
    Figure PCTCN2017103772-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为所述预设位置增量。
  4. 如权利要求1所述的双色渲染方法,其特征在于,所述以所述当前位置点对应的目标颜色填充所述圆形区域的步骤之后还包括:
    当所述调色块逆向移动时,确定所述移动轨迹上所述调色块所在的位置点对应的颜色,并以所述对应的颜色填充所述调色块所在的位置点对应的圆形区域。
  5. 如权利要求2所述的双色渲染方法,其特征在于,所述调色块移动时绕所述色盘的原点旋转,所述计算所述调色块从所述初始位置移动到当前位置点时的位置增量的步骤包括:
    获取所述调色块的移动轨迹的每一个位置点的坐标,并得到所述原点到所述移动轨迹的每一个位置点的坐标的向量;
    累计计算所述初始位置与当前位置点之间相邻的向量的夹角,以得到所述调色块从所述初始位置移动到所述当前位置点时的位置增量。
  6. 如权利要求1所述的双色渲染方法,其特征在于,所述以所述调色块所在的当前位置点为圆心画圆,形成圆形区域,并以所述当前位置点对应的目标颜色填充所述圆形区域的步骤包括:
    判断所述色盘上所述调色块所在的当前位置点是否存在对应的圆形区域;
    若是,将所述当前位置点对应的圆形区域的颜色替换为所述目标颜色;
    若否,则以所述当前位置点为圆心画圆,形成圆形区域,并以所述目标颜色填充所述当前位置点对应的圆形区域。
  7. 一种取色方法,其特征在于,应用于权利要求1至7中任意一项所述的色盘,包括:
    当获取到点击信号时,确定点击位置的坐标,并将所述调色块移动到所述色盘上所述坐标对应的位置点;
    选取所述色盘上所述坐标对应的位置点的圆形区域的颜色。
  8. 一种色盘,其特征在于,所述色盘上设有调色块,所述色盘包括:
    颜色获取模块,用于当所述调色块在所述色盘上正向移动时,获取所述调色块在所述色盘的初始位置对应的第一颜色以及获取用户选择的第二颜色;
    计算模块,用于遍历所述调色块的移动轨迹的每一个位置点,根据所述调色块移动的位置增量计算所述第一颜色向所述第二颜色变化的颜色增量,以得到所述调色块在所述移动轨迹的每个位置点对应的目标颜色;
    第一填充模块,以所述调色块所在的当前位置点为圆心画圆,形成圆形区域,并以所述当前位置点对应的目标颜色填充所述圆形区域。
  9. 一种可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1至7任意一项所述的方法的步骤。
  10. 一种计算机,包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实现如权利要求1至7任意一项所述的方法的步骤。
PCT/CN2017/103772 2017-07-01 2017-09-27 色盘、双色渲染方法、取色方法、可读存储介质及计算机 Ceased WO2019006892A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710528493.XA CN107479839B (zh) 2017-07-01 2017-07-01 色盘、双色渲染方法、取色方法、可读存储介质及计算机
CN201710528493.X 2017-07-01

Publications (1)

Publication Number Publication Date
WO2019006892A1 true WO2019006892A1 (zh) 2019-01-10

Family

ID=60595336

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/103772 Ceased WO2019006892A1 (zh) 2017-07-01 2017-09-27 色盘、双色渲染方法、取色方法、可读存储介质及计算机

Country Status (2)

Country Link
CN (1) CN107479839B (zh)
WO (1) WO2019006892A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113133152B (zh) * 2021-04-30 2023-01-24 深圳市爱图仕影像器材有限公司 照明装置配色方法、装置及存储介质
CN113238598B (zh) * 2021-04-30 2022-05-06 深圳市爱图仕影像器材有限公司 照明装置配色方法、装置及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101321228A (zh) * 2007-06-06 2008-12-10 富士施乐株式会社 颜色调节装置、计算机可读介质以及颜色调节方法
CN102541485A (zh) * 2010-10-13 2012-07-04 普驰信息技术有限公司 颜色选择图形用户界面
CN105657391A (zh) * 2016-01-04 2016-06-08 京东方科技集团股份有限公司 一种图像处理的方法及装置
US20170011711A1 (en) * 2005-10-03 2017-01-12 Gary Lynn Campbell Computerized, personal-color analysis sytem

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110292069A1 (en) * 2010-05-28 2011-12-01 Witt David Joseph RGB Color Mixer
CN105630287B (zh) * 2015-12-21 2018-10-26 天脉聚源(北京)教育科技有限公司 一种颜色获取方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170011711A1 (en) * 2005-10-03 2017-01-12 Gary Lynn Campbell Computerized, personal-color analysis sytem
CN101321228A (zh) * 2007-06-06 2008-12-10 富士施乐株式会社 颜色调节装置、计算机可读介质以及颜色调节方法
CN102541485A (zh) * 2010-10-13 2012-07-04 普驰信息技术有限公司 颜色选择图形用户界面
CN105657391A (zh) * 2016-01-04 2016-06-08 京东方科技集团股份有限公司 一种图像处理的方法及装置

Also Published As

Publication number Publication date
CN107479839B (zh) 2020-11-03
CN107479839A (zh) 2017-12-15

Similar Documents

Publication Publication Date Title
US10552947B2 (en) Depth-based image blurring
US11163418B2 (en) Systems and methods for providing a user interface for an environment that includes virtual objects
US9495087B2 (en) Two-dimensional slider control
US10347012B2 (en) Interactive color palette interface for digital painting
CN109308203B (zh) 饼图标签显示方法、系统、可读存储介质和计算机设备
WO2020011249A1 (zh) 拼接屏的图像处理方法及装置、拼接屏
US8982127B2 (en) Computing device and method for establishing three dimensional coordinate system using graphics
CN107491522B (zh) 一种二维地图与三维地图之间的切换方法及装置
US9910512B1 (en) Systems and methods for using cursor movement profiles
CN112085663A (zh) 利用上下文感知传感器和多维姿势输入生成增强数字图像
JP6582472B2 (ja) 画像処理装置、画像処理システムおよびプログラム
US20150242099A1 (en) Automatically generating a multi-color palette and picker
WO2023093291A1 (zh) 图像处理方法、装置、计算机设备和计算机程序产品
WO2019006892A1 (zh) 色盘、双色渲染方法、取色方法、可读存储介质及计算机
CN105741327A (zh) 提取图片的主色和醒目色的方法和装置
US9601086B1 (en) Defining a projector display region
CN107463349B (zh) 色盘建立方法及颜色定位方法
US7586499B1 (en) Method and apparatus for adjusting the color of a digital image
CN107050859B (zh) 一种基于unity3D的拖动相机在场景中位移的方法
US10380721B2 (en) Adjusting blurry vector-based lines during movement
US11436734B2 (en) Directional digital paint application
WO2019006893A1 (zh) 色盘、调色方法、可读存储介质和计算机设备
US11550460B1 (en) Systems for leveraging device orientation to modify visual characteristics of edits
US8890885B1 (en) Efficiently copying and blending a source region into a target region
Korinke et al. SuperSelect: an interactive superpixel-based segmentation method for touch displays

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: 17916682

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17916682

Country of ref document: EP

Kind code of ref document: A1