CN108986180B - Palette generation method and device and electronic equipment - Google Patents

Palette generation method and device and electronic equipment Download PDF

Info

Publication number
CN108986180B
CN108986180B CN201810582280.XA CN201810582280A CN108986180B CN 108986180 B CN108986180 B CN 108986180B CN 201810582280 A CN201810582280 A CN 201810582280A CN 108986180 B CN108986180 B CN 108986180B
Authority
CN
China
Prior art keywords
color
determining
palette
value
mixed
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.)
Active
Application number
CN201810582280.XA
Other languages
Chinese (zh)
Other versions
CN108986180A (en
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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Advanced New Technologies 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 Advanced New Technologies Co Ltd filed Critical Advanced New Technologies Co Ltd
Priority to CN201810582280.XA priority Critical patent/CN108986180B/en
Publication of CN108986180A publication Critical patent/CN108986180A/en
Application granted granted Critical
Publication of CN108986180B publication Critical patent/CN108986180B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour

Landscapes

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

Abstract

The application discloses a method and a device for generating a palette and electronic equipment, wherein the method comprises the following steps: determining a dominant color of the palette; determining a proportional value corresponding to the designated number through a Bezier curve based on the designated number; determining a mixed color based on a magnitude relationship between the designated number and the number of the dominant color; generating the palette based on the dominant color, the ratio value, and the mixed color.

Description

Palette generation method and device and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for generating a palette, and an electronic device.
Background
The color palette may be a color table, which may be composed of a series of basic colors with certain representativeness and their gradient colors, and the user can find the required color in the color palette and obtain the color value.
In the existing palette implementation, a selected main color and pure white are mixed to form a light color part, and the main color and pure black are mixed to form a dark color part, thereby generating a palette. For example, for a palette requiring 9 gradient colors, a dominant color is first selected as color 5, and then the dominant color is mixed with pure white, the dominant color is mixed with 80% pure white as color 1, the dominant color is mixed with 60% pure white as color 2, the dominant color is mixed with 40% pure white as color 3, and the dominant color is mixed with 20% pure white as color 4. Then, the main color is mixed with pure black, the main color is mixed with 20% of pure black as color No. 6, the main color is mixed with 40% of pure black as color No. 7, the main color is mixed with 60% of pure black as color No. 8, and the main color is mixed with 80% of pure black as color No. 9. A complete gradual change color plate is obtained through the method. However, the color of the dark and light parts of the palette formed in this way is not complete, and particularly, the color of the dark part is gray.
Disclosure of Invention
The embodiment of the application provides a method and a device for generating a color palette, and electronic equipment, so that the color palette is generated through a Bezier curve, and the problems that the hue of a deep part and a shallow part in the formed color palette is incomplete, and particularly the color of the deep part is gray are solved.
The embodiment of the application adopts the following technical scheme:
in a first aspect, a method for generating a palette is provided, where the method includes:
determining a dominant color of the palette;
determining a proportional value corresponding to the designated number through a Bezier curve based on the designated number;
determining a mixed color based on a magnitude relationship between the designated number and the number of the dominant color;
generating the palette based on the dominant color, the ratio value, and the mixed color.
In a second aspect, there is provided a palette generating apparatus, the apparatus including:
the dominant color determining module is used for determining the dominant color of the palette;
the proportion value determining module is used for determining the proportion value corresponding to the specified number through a Bezier curve based on the specified number;
a color determination module for determining a mixed color based on a magnitude relationship between the designated number and the number of the dominant color;
a generating module to generate the color palette based on the dominant color, the proportional value, and the mixed color.
In a third aspect, an electronic device is provided, which includes:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
determining a dominant color of the palette;
determining a proportional value corresponding to the designated number through a Bezier curve based on the designated number;
determining a mixed color based on a magnitude relationship between the designated number and the number of the dominant color;
generating the palette based on the dominant color, the ratio value, and the mixed color.
In a fourth aspect, a computer-readable storage medium is provided that stores one or more programs that, when executed by an electronic device that includes a plurality of application programs, cause the electronic device to:
determining a dominant color of the palette;
determining a proportional value corresponding to the designated number through a Bezier curve based on the designated number;
determining a mixed color based on a magnitude relationship between the designated number and the number of the dominant color;
generating the palette based on the dominant color, the ratio value, and the mixed color.
The embodiment of the application adopts at least one technical scheme which can achieve the following beneficial effects:
for each number on the palette, a proportion value corresponding to the designated number can be determined through the Bezier curve, and based on the characteristics of the Bezier curve, the proportion value can be smoothly transited based on the designated number; after the palette is generated through the proportion value, the main color and the mixed color, the palette has the characteristic of a Bezier curve based on the proportion value, so that the transition of color gradation is more harmonious, and the problem that the hue of the depth part in the formed palette is incomplete, particularly the color of the deep color part is gray due to the superposition of equal proportion is avoided.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a method of generating a palette according to an embodiment of the present application;
FIG. 2 is a schematic illustration of the determination of a scaling value from a Bezier curve according to an embodiment of the present application;
FIG. 3 is a schematic structural diagram of an electronic device according to one embodiment of the present application;
fig. 4 is a schematic structural diagram of a palette generation apparatus according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic flowchart of a palette generation method according to an embodiment of the present application. The execution subject of the method shown in fig. 1 can be, but is not limited to, a mobile phone, a computer, and other intelligent terminals. Or the execution subject of the method shown in fig. 1 may also be a client itself capable of executing the method, for example, the method shown in fig. 1 is executed by the palette generation device.
As shown in fig. 1, at S102, a dominant color of the palette is determined.
The palette is composed of a series of basic colors with certain representativeness and their gradient colors, and the user can find the required color in the palette and acquire the color value.
Based on the principle of palette making, the dominant color of the palette analysis may be determined first. It should be noted that, at the same time of determining the main color of the palette, the number of the main color (main color number) is determined at the same time.
For example, the user may select a dominant color as color number 5. The specific color of the dominant color may be selected by the user.
At S104, based on the designated number, a scale value corresponding to the designated number is determined by the bezier curve.
The designated number may be a preset number. For example, the preset number may be 1 to 9, where color No. 5 is the dominant color.
The Bezier curve realizes smooth transition of the curve, and the more points on the curve, the smoother the curve transition.
The designated number can be associated with the scale value by means of a bezier curve, whereby, based on the designated number, a corresponding scale value can be uniquely determined by means of the bezier curve, so that, based on the designated number, a more smooth determination of the scale value is possible.
For example, for numbers 1 to 9, the corresponding scale values determined may then be smoothly transitioned.
At S106, a mixed color is determined based on the magnitude relationship between the designated number and the number of the main color.
The main color plate generally comprises a light color part and a dark color part which are two color plates. For light-colored partial color panels, the dominant color is mainly mixed with white. For dark part color panels, the dominant color is mainly mixed with black. Here, white and black are mixed colors.
Here, it should be noted that the mixed color may be another color, and particularly, for the dark partial color plate, the mixed color is not limited to black, and may be generated based on the dominant color.
It is further noted that, in general, when the designated number is less than or equal to the number of the main color, the designated portion is usually the number of the light portion color plate, and when the designated number is greater than the number of the main color, the designated number is usually the number of the dark portion color plate. Therefore, based on the magnitude relationship between the designated number and the number of the dominant color, the mixed color can be determined.
For example, for the color palette including numbers 1 to 9, color No. 5 is the main color, color nos. 1 to 4 are light part color plates, and color nos. 6 to 9 are dark part color plates.
At S108, a color palette is generated based on the dominant color, the scale value, and the mixed color.
The brightness of the mixed color can be adjusted based on the ratio value, and then the main color and the adjusted mixed color are mixed to generate a corresponding color palette.
For each number on the palette, a proportion value corresponding to the designated number can be determined through the Bezier curve, and based on the characteristics of the Bezier curve, the proportion value can be smoothly transited based on the designated number; after the palette is generated through the proportion value, the main color and the mixed color, the palette has the characteristic of a Bezier curve based on the proportion value, so that the transition of color gradation is more harmonious, and the problem that the hue of the depth part in the formed palette is incomplete, particularly the color of the deep color part is gray due to the superposition of equal proportion is avoided.
In some embodiments, the bezier curve may be represented by a bernstein base polynomial of order n, and the value of n may preferably be between 1 and 10 based on practical applications, where the present implementation does not specifically limit the value of n, and the magnitude of n does not affect the specific implementation of the present embodiment.
FIG. 2 is a schematic illustration of the determination of a scale value from a Bezier curve according to an embodiment of the present application. As shown in fig. 2, the bezier curve in the graph may be plotted based on parameters 0.26, 0.09, 0.67, 0.73. 0.26 corresponds to the parameter ctx, 0.09 corresponds to the parameter start, 0.67 corresponds to the parameter end, and 0.73 corresponds to the parameter curvature.
For the above parameters, the bezier curve may be generated by the following function, namely:
*@param{CanvasRenderingContext2D}ctx;
a start point of @ param { Array < number > };
(vii) at param { Array < number > } end point;
@ param { number } curve (0-1);
*/function drawCurvePath(ctx,start,end,curveness){};
the abscissa of the generated bezier curve may represent the number of the palette, and the ordinate may represent the scale value corresponding to the number of the palette.
As can be seen from fig. 2, when the scale value corresponding to the designated number is determined by the bezier curve based on the designated number, the abscissa coordinate point in the two-dimensional coordinate system in which the bezier curve is located may be determined based on the designated number; based on the abscissa coordinate points, the proportional values on the ordinate axis corresponding to the abscissa coordinate points may be determined by a bezier curve.
Wherein, the distance between any two adjacent numbers in fig. 2 is the same. It should be further noted that, the horizontal axis and the vertical axis are relative, and the two may be converted in position based on their own positional relationship, for example, the two may be rotated in the same direction by 90 degrees to convert the horizontal axis and the vertical axis, but this does not affect the implementation of the present embodiment.
Alternatively, as an example, when the proportional value on the vertical axis corresponding to the abscissa coordinate point is determined by the bezier curve based on the abscissa coordinate point, an intersection point of a straight line passing through the abscissa coordinate point and perpendicular to the abscissa and the bezier curve may be determined based on the abscissa coordinate point; based on the intersection point, a scale value corresponding to the intersection point on the vertical axis in the two-dimensional coordinate system can be determined.
Specifically, color No. 6 in fig. 2 is the dominant color, and the proportional value corresponding to color No. 1 is 7.6%, indicating that color No. 1 is reduced by 93%; the ratio of color No. 6 is 100%, indicating that the dominant color is reduced by 0%.
Alternatively, as an example, when determining the mixed color, white may be determined as the mixed color of the light part color plate, that is, when the designated number is less than or equal to the number of the main color, white may be determined as the mixed color. And for the mixed color of the light part color plate, the main color can be adjusted to form the mixed color, and specifically, when the specified number is larger than the number of the main color, the color of the main color after the HSB value adjustment can be determined as the mixed color.
When the dominant color is adjusted, the dominant color may be correspondingly hue-rotated and the luminance value may be deepened based on the HSB model to generate a mixed color. The color palette obtained in this way has the advantages that the colors of the color plates of the dark color part are not gray, and the overall visual sensation can be improved.
In the HSB model, H represents hue (H, hue). And on a standard color wheel with the angle of 0-360 degrees, the hue is measured according to the position. In common use, the hue is identified by a color name, such as red, green, or orange. Black and white leuco phases.
S represents the color purity (S), and is gray when S is 0. None of the white, black and other gray colors is saturated. At maximum saturation, each hue has the purest shade. The S value range is 0-100%.
B represents brightness (B), which is the brightness of a color. When B is 0, it is black. The maximum brightness is the state of the brightest color. The S value range is 0-100%.
RGB represents the colors of three channels of red, green and blue, and various colors can be obtained by changing the three color channels of red (R), green (G) and blue (B) and superposing the three color channels with each other. Therefore, any one dominant color can be represented in the form of RGB.
Any color represented by RGB can be represented in a three-dimensional space, and the hue rotation is the rotation of an RGB point on the three-dimensional space by a certain angle around the perpendicular bisector of the plane formed by the RGB three points.
When the dominant color is adjusted, the corresponding hue of the dominant color may be rotated based on the cool/warm tone of the color to deepen the brightness value. Specifically, when the dominant color is a warm color, the hue of the dominant color may be rotated counterclockwise by a first preset angle, and the brightness value of the dominant color may be deepened by a first preset ratio; and when the main color is the cold color, clockwise rotating the hue of the main color by a second preset angle, and deepening the brightness value of the main color by a second preset proportion.
When the main color is different cold and warm colors, the different strategies are executed to perform corresponding hue rotation on the main color and deepen the brightness value, and the purpose of performing targeted hue rotation on the darkest value of the main color of the cold and warm colors can be achieved, so that the color visual effect is improved.
Wherein, the first preset angle may be 26 degrees, and the first preset proportion may be 50%; the second predetermined angle may be 10 degrees, and the second predetermined ratio may be 55%. These values may be such that the B value in the HSB model of mixed colors is the maximum, i.e. B is 100%. The maximum value of B is only the optimal choice of this embodiment, and the value of B may be other different values, which are all within the implementation range of this embodiment. It should be noted that the above specific values are only preferred values determined by the present embodiment according to actual situations, the present embodiment is not limited to the specific limitations on the above values, the first preset angle and the second preset angle may be other values, and the first preset ratio and the second preset ratio may also be other values.
For the generated palette, for any dominant color (including any color customized by the user), a more satisfactory dominant color tone scale can be obtained through the Bezier curve and the HSB model, and the requirements of the user are met.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
An electronic device according to an embodiment of the present application will be described in detail below with reference to fig. 3. Referring to fig. 3, at a hardware level, the electronic device includes a processor, optionally, an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory, such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, the network interface, and the memory may be interconnected by an internal bus, which may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 3, but this does not indicate only one bus or one type of bus.
And the memory is used for storing programs. In particular, the program may include program code comprising computer operating instructions. The memory may include both memory and non-volatile storage and provides instructions and data to the processor.
The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to form the palette generation device on the logic level. The processor is used for executing the program stored in the memory and is specifically used for executing the following operations:
determining a dominant color of the palette;
determining a proportional value corresponding to the designated number through a Bezier curve based on the designated number;
determining a mixed color based on a magnitude relationship between the designated number and the number of the dominant color;
generating the palette based on the dominant color, the ratio value, and the mixed color.
The method for generating a palette according to the embodiment of fig. 1 of the present application may be applied to a processor, or may be implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
Of course, besides the software implementation, the electronic device of the present application does not exclude other implementations, such as a logic device or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or a logic device.
Embodiments of the present application also provide a computer-readable storage medium storing one or more programs, where the one or more programs include instructions, which, when executed by an electronic device including a plurality of application programs, enable the electronic device to perform the method of the embodiment shown in fig. 1, and are specifically configured to perform the following method:
determining a dominant color of the palette;
determining a proportional value corresponding to the designated number through a Bezier curve based on the designated number;
determining a mixed color based on a magnitude relationship between the designated number and the number of the dominant color;
generating the palette based on the dominant color, the ratio value, and the mixed color.
Fig. 4 is a schematic structural diagram of a palette generation apparatus according to an embodiment of the present application. As shown in fig. 4, in one software implementation, the palette generating apparatus 400 includes:
a dominant color determination module 420 for determining a dominant color of the palette;
a proportional value determining module 440, configured to determine, based on a specified number, a proportional value corresponding to the specified number through a bezier curve;
a color determination module 460, configured to determine a mixed color based on a magnitude relationship between the designated number and the number of the dominant color;
a generating module 480 configured to generate the color palette based on the dominant color, the ratio value, and the mixed color.
Based on the palette generation apparatus of the present embodiment, for each number on the palette, a proportional value corresponding to the designated number may be determined by a bezier curve, and based on the characteristics of the bezier curve, the proportional value may transition smoothly based on the designated number; after the palette is generated through the proportion value, the main color and the mixed color, the palette has the characteristic of a Bezier curve based on the proportion value, so that the transition of color gradation is more harmonious, and the problem that the hue of the depth part in the formed palette is incomplete, particularly the color of the deep color part is gray due to the superposition of equal proportion is avoided.
Alternatively, as one embodiment, the ratio value determination module 440,
determining a horizontal axis coordinate point in a two-dimensional coordinate system where the Bezier curve is located based on the designated number;
determining, from the Bezier curve, a proportional value on a vertical axis corresponding to the abscissa coordinate point based on the abscissa coordinate point.
Alternatively, as one embodiment, the ratio value determination module 440,
determining an intersection point of a straight line passing through the abscissa coordinate point and perpendicular to the abscissa and the Bezier curve based on the abscissa coordinate point;
and determining a proportion value corresponding to the intersection point on a longitudinal axis in the two-dimensional coordinate system based on the intersection point.
Alternatively, as one embodiment, the color determination module 460,
determining white as a mixed color when the designated number is less than or equal to the number of the dominant color;
and when the specified number is greater than the number of the main color, determining the color of the main color after the HSB value is adjusted as a mixed color.
Alternatively, as one embodiment, the color determination module 460,
and performing corresponding hue rotation on the main color and deepening a brightness value to generate the mixed color based on an HSB model.
Alternatively, as one embodiment, the color determination module 460,
when the main color is warm, rotating the hue of the main color counterclockwise by a first preset angle, and deepening the brightness value of the main color by a first preset proportion;
and when the main color is a cold color, clockwise rotating the hue of the main color by a second preset angle, and deepening the brightness value of the main color by a second preset proportion.
Alternatively, the processor may, as an embodiment,
the first preset angle is 26 degrees, and the first preset proportion is 50%;
the second preset angle is 10 degrees, and the second preset proportion is 55%.
Alternatively, the computer program, as an embodiment,
the B value in the HSB model of the mixed color is the maximum value.
Optionally, as one embodiment, the generating module 480
Adjusting the brightness of the mixed color based on the ratio value;
and mixing the main color and the adjusted mixed color to generate a corresponding color palette.
Optionally, as an embodiment, the specified number is a preset number.
The palette generating device 400 may also execute the method in the embodiment shown in fig. 1, and implement the functions of the palette generating device 400 in the embodiment shown in fig. 1, which are not described herein again in this embodiment of the present application.
In short, the above description is only a preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (13)

1. A method of generating a palette, comprising:
determining a dominant color of the palette;
determining a proportional value corresponding to the designated number through a Bezier curve based on the designated number;
determining a mixed color based on a magnitude relationship between the designated number and the number of the dominant color;
generating the palette based on the dominant color, the ratio value, and the mixed color.
2. The method of claim 1, wherein the first and second light sources are selected from the group consisting of,
determining, by a Bezier curve, a proportional value corresponding to a specified number based on the specified number, including:
determining a horizontal axis coordinate point in a two-dimensional coordinate system where the Bezier curve is located based on the designated number;
determining, from the Bezier curve, a proportional value on a vertical axis corresponding to the abscissa coordinate point based on the abscissa coordinate point.
3. The method of claim 2, wherein the first and second light sources are selected from the group consisting of,
the determining, by the bezier curve, a proportional value on a longitudinal axis corresponding to the abscissa coordinate point based on the abscissa coordinate point includes:
determining an intersection point of a straight line passing through the abscissa coordinate point and perpendicular to the abscissa and the Bezier curve based on the abscissa coordinate point;
and determining a proportion value corresponding to the intersection point on a longitudinal axis in the two-dimensional coordinate system based on the intersection point.
4. The method of claim 1, wherein the first and second light sources are selected from the group consisting of,
the determining a mixed color based on a magnitude relationship between the designated number and the number of the dominant color includes:
determining white as a mixed color when the designated number is less than or equal to the number of the dominant color;
and when the specified number is larger than the number of the main color, determining the color of the main color after the HSB value is adjusted as a mixed color.
5. The method of claim 4, wherein the first and second light sources are selected from the group consisting of,
the determining the color of the main color after the HSB value adjustment as a mixed color comprises the following steps:
and performing corresponding hue rotation on the main color and deepening a brightness value to generate the mixed color based on an HSB model.
6. The method of claim 5, wherein said at least one of said first and second sets of parameters is selected from the group consisting of,
the performing corresponding hue rotation and deepening a brightness value on the dominant color to generate the mixed color includes:
when the main color is warm, rotating the hue of the main color counterclockwise by a first preset angle, and deepening the brightness value of the main color by a first preset proportion;
and when the main color is a cold color, clockwise rotating the hue of the main color by a second preset angle, and deepening the brightness value of the main color by a second preset proportion.
7. The method of claim 6, wherein said at least one of said first and second sets of parameters is selected from the group consisting of,
the first preset angle is 26 degrees, and the first preset proportion is 50%;
the second preset angle is 10 degrees, and the second preset proportion is 55%.
8. The method of claim 4, wherein the first and second light sources are selected from the group consisting of,
the B value in the HSB model of mixed colors is the maximum.
9. The method according to any one of claims 1 to 8,
the generating the palette based on the dominant color, the ratio value, and the mixed color comprises:
adjusting the brightness of the mixed color based on the ratio value;
and mixing the main color and the adjusted mixed color to generate a corresponding color palette.
10. The method of claim 1, wherein the first and second light sources are selected from the group consisting of,
the specified number is a preset number.
11. A palette generation apparatus comprising:
the dominant color determining module is used for determining the dominant color of the palette;
the proportion value determining module is used for determining the proportion value corresponding to the specified number through a Bezier curve based on the specified number;
a color determination module for determining a mixed color based on a magnitude relationship between the designated number and the number of the dominant color;
a generating module to generate the color palette based on the dominant color, the proportional value, and the mixed color.
12. An electronic device, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
determining a dominant color of the palette;
determining a proportion value corresponding to the designated number through a Bezier curve based on the designated number;
determining a mixed color based on a magnitude relationship between the designated number and the number of the dominant color;
generating the palette based on the dominant color, the scale value, and the mixed color.
13. A computer-readable storage medium storing one or more programs that, when executed by an electronic device including a plurality of application programs, cause the electronic device to:
determining a dominant color of the palette;
determining a proportional value corresponding to the designated number through a Bezier curve based on the designated number;
determining a mixed color based on a magnitude relationship between the designated number and the number of the dominant color;
generating the palette based on the dominant color, the ratio value, and the mixed color.
CN201810582280.XA 2018-06-07 2018-06-07 Palette generation method and device and electronic equipment Active CN108986180B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810582280.XA CN108986180B (en) 2018-06-07 2018-06-07 Palette generation method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810582280.XA CN108986180B (en) 2018-06-07 2018-06-07 Palette generation method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN108986180A CN108986180A (en) 2018-12-11
CN108986180B true CN108986180B (en) 2022-09-16

Family

ID=64540984

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810582280.XA Active CN108986180B (en) 2018-06-07 2018-06-07 Palette generation method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN108986180B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111381912B (en) * 2018-12-29 2024-02-02 北京金山云网络技术有限公司 UI palette determining method, device, equipment and storage medium
CN110196935B (en) * 2019-06-06 2021-03-30 山东大学 Palette generation method and system based on data distribution
US11336897B2 (en) * 2019-12-30 2022-05-17 Alibaba Group Holding Limtted Method and apparatus for coding video data in palette mode
CN111915688B (en) * 2020-08-06 2021-05-28 上海嗨普智能信息科技股份有限公司 Theme style generation method, electronic device and medium
CN112199619B (en) * 2020-10-30 2024-03-22 杭州安恒信息技术股份有限公司 Page color adjustment method, device, equipment and readable storage medium
CN113703635A (en) * 2021-08-31 2021-11-26 维沃移动通信有限公司 Color processing method and device and electronic equipment
CN113935891B (en) * 2021-09-09 2022-08-26 完美世界(北京)软件科技发展有限公司 Pixel-style scene rendering method, device and storage medium

Family Cites Families (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3223512B2 (en) * 1990-12-19 2001-10-29 ソニー株式会社 Image display method and apparatus
JP4095609B2 (en) * 2003-12-15 2008-06-04 キヤノン株式会社 Color processing apparatus and method
US20110191674A1 (en) * 2004-08-06 2011-08-04 Sensable Technologies, Inc. Virtual musical interface in a haptic virtual environment
CN101655983B (en) * 2008-08-18 2012-12-12 索尼(中国)有限公司 Device and method for exacting dominant color
JP5041041B2 (en) * 2009-07-15 2012-10-03 株式会社ニコン Image classification device
US8933962B2 (en) * 2010-11-15 2015-01-13 Microsoft Corporation Clipart cartoon techniques
JP2013020335A (en) * 2011-07-08 2013-01-31 Nikon Corp Image classification method
JP5836831B2 (en) * 2012-02-16 2015-12-24 日本放送協会 Image correction apparatus and program thereof
DE102013215438A1 (en) * 2012-08-06 2014-02-06 Wixpress Ltd System for treating color assignment within e.g. text processing document in computing device, has color handler modifying color schema, and color processor processing updated color schema and applying updated color schema to component
US20160100179A1 (en) * 2014-10-06 2016-04-07 Vid Scale, Inc. Palette coding for screen content coding
WO2016065173A1 (en) * 2014-10-22 2016-04-28 Alibaba Group Holding Limited Method and apparatus for displaying statistical graphs on a terminal display
US10068179B2 (en) * 2015-07-29 2018-09-04 Adobe Systems Incorporated Positioning text in digital designs based on an underlying image
CN105551069B (en) * 2015-11-30 2018-08-14 中国农业科学院棉花研究所 A kind of real-time generation method and system of thumbnail
US20170206677A1 (en) * 2016-01-14 2017-07-20 Adp, Llc Intelligent Color Palettes Based on One or More Principal Colors
CN106873959B (en) * 2016-07-12 2020-05-19 阿里巴巴集团控股有限公司 Software interface color matching method and device
CN106875454A (en) * 2016-07-20 2017-06-20 阿里巴巴集团控股有限公司 A kind of gradient color generation method and device
CN107945253A (en) * 2017-11-21 2018-04-20 腾讯数码(天津)有限公司 A kind of animation effect implementation method, device and storage device

Also Published As

Publication number Publication date
CN108986180A (en) 2018-12-11

Similar Documents

Publication Publication Date Title
CN108986180B (en) Palette generation method and device and electronic equipment
US9147236B2 (en) Method and device for generating high dynamic range images
US10726580B2 (en) Method and device for calibration
US20150363913A1 (en) Adaptive filter demosaicizing for super resolution
US20140267822A1 (en) Tone mapping method
CN113127593B (en) Standard chart generation method and device
WO2016197470A1 (en) Method and apparatus for setting background picture of unlocking interface of application program, and electronic device
CN110363837B (en) Method and device for processing texture image in game, electronic equipment and storage medium
CN104182927A (en) Method and device for adding watermark to image
CN110599427A (en) Fisheye image correction method and device and terminal equipment
CN108280135B (en) Method and device for realizing visualization of data structure and electronic equipment
CN111198684A (en) Method, apparatus, device and medium for data processing and graphic engine establishment
CN113759734A (en) Internet of things equipment intelligent linkage realization method and device and Internet of things equipment platform
CN104008523A (en) Graphic processing method
CN117112090A (en) Business page theme generation method, device, computer equipment, medium and product
CN116363239A (en) Method, device, equipment and storage medium for generating special effect diagram
WO2023060874A1 (en) Picture classification and object detection synchronous processing method and system, storage medium, and terminal
CN113986175A (en) Color selection method and device, electronic equipment and readable medium
CN114363519A (en) Image processing method and device and electronic equipment
CN109544483B (en) Video image brightness and contrast enhancement method and device
Drew et al. Color from shape from color: A simple formalism with known light sources
CN110969674A (en) Method and device for generating winding drawing, terminal equipment and readable storage medium
CN116363294A (en) Halation effect generation method and device, electronic equipment and storage medium
CN112017174B (en) Image processing method, device, electronic equipment and storage medium
CN111292245A (en) Image processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20200930

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

Effective date of registration: 20200930

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Applicant before: Advanced innovation technology Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
CB03 Change of inventor or designer information

Inventor after: Zhou Xingyu

Inventor after: Zhu Xingmin

Inventor after: Lin Xiaoqing

Inventor before: Zhou Xingyu

CB03 Change of inventor or designer information