Theme color matching generation method and device, electronic equipment and storage medium

By obtaining the user's theme color matching requirements information and calling the big model to generate target color values, the problem of lack of flexibility and personalization of theme color matching in the existing technology is solved, and a more accurate and automated theme color matching generation is achieved.

CN120123035APending Publication Date: 2025-06-10BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510287641.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-11
Publication Date
2025-06-10

AI Technical Summary

Technical Problem

The existing website theme color scheme lacks flexibility and personalization, and usually relies on manual preset fixed theme colors, which is difficult to meet users' personalized needs.

Method used

By obtaining the user's theme color matching requirements information, calling the big model to generate the target color value, and determining the theme's target color matching strategy based on the target color value, to achieve automated theme color matching generation.

Benefits of technology

It improves the flexibility and personalization of the theme color matching, can more accurately meet the user's style and atmosphere needs, and greatly improves the degree of automation of the color matching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120123035A_ABST
    Figure CN120123035A_ABST
Patent Text Reader

Abstract

The invention provides a theme color matching generation method and device, electronic equipment and a storage medium, and relates to the technical field of image processing, in particular to the fields of large models, webpage design, natural language processing and the like. According to the specific implementation scheme, first color matching demand information of a theme is obtained; calling a large model, and outputting a target color value by the large model according to the first color matching demand information; and determining a target color matching strategy of the theme according to the target color value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing technologies, and particularly to fields such as large models, web design, and natural language processing. Specifically, it relates to a method, apparatus, electronic device, and storage medium for generating theme color schemes. Background Art

[0002] Currently, most mainstream website theme color schemes rely on manually selecting preset fixed theme colors for switching. Usually, several theme color schemes are pre-set by front-end developers or designers, and manual switching options are provided in the user interface, lacking flexibility and personalization. Summary of the Invention

[0003] The present disclosure provides a method, apparatus, electronic device, and storage medium for generating theme color schemes.

[0004] According to one aspect of the present disclosure, a method for generating a theme color scheme is provided, including:

[0005] Obtaining first color matching requirement information of a theme;

[0006] Invoking a large model, and causing the large model to output target color values according to the first color matching requirement information;

[0007] Determining a target color matching strategy of the theme according to the target color values.

[0008] According to a second aspect of the present disclosure, a device for generating a theme color scheme is provided, including:

[0009] An obtaining module, configured to obtain first color matching requirement information of a theme;

[0010] An invoking module, configured to invoke a large model, and causing the large model to output target color values according to the first color matching requirement information;

[0011] A generating module, configured to determine a target color matching strategy of the theme according to the target color values.

[0012] According to a third aspect of the present disclosure, an electronic device is provided, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the method according to the embodiment of the first aspect.

[0013] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute the method according to the embodiment of the first aspect.

[0014] According to a fifth aspect of the present disclosure, there is provided a computer program which, when executed by a processor, implements the steps of the method according to the embodiments of the first aspect.

[0015] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The drawings are used to better understand the solution and do not constitute a limitation to the present disclosure. Among them:

[0017] Figure 1 is a schematic diagram of a method for generating a theme color scheme provided by an embodiment of the present disclosure;

[0018] Figure 2 is a schematic diagram of another method for generating a theme color scheme provided by an embodiment of the present disclosure;

[0019] Figure 3 is a schematic diagram of another method for generating a theme color scheme provided by an embodiment of the present disclosure;

[0020] Figure 4 is a schematic diagram of another method for generating a theme color scheme provided by an embodiment of the present disclosure;

[0021] Figure 5 is a schematic diagram of the structure of a device for generating a theme color scheme provided by an embodiment of the present disclosure;

[0022] Figure 6 shows a schematic block diagram of an exemplary electronic device for implementing the embodiments of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0023] The following describes exemplary embodiments of the present disclosure with reference to the accompanying drawings. Various details of the embodiments of the present disclosure are included to assist in understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, descriptions of well-known functions and structures are omitted for clarity and conciseness.

[0024] Image processing refers to the methods and techniques of using a computer to perform operations such as noise removal, enhancement, restoration, segmentation, and feature extraction on images to achieve the desired results. Generally, it refers to digital image processing, including parts such as image compression, enhancement, restoration, matching, description, and recognition.

[0025] A large model refers to a machine learning model with a large number of parameters and a complex computational structure. It can handle more complex tasks and data, learn complex patterns and features by training on a vast amount of data, and has a stronger generalization ability. It can process massive amounts of data and complete various complex tasks, such as natural language processing, computer vision, speech recognition, etc.

[0026] Web design is to plan the website functions and design and beautify the pages according to the information that an enterprise hopes to convey to visitors (including products, services, concepts, culture). Generally, it includes functional web design, image-based web design, and information-based web design.

[0027] Natural Language Processing (NLP) is an important research direction in the field of artificial intelligence. It integrates knowledge from multiple disciplinary fields such as linguistics, computer science, machine learning, mathematics, and cognitive psychology. It includes two main aspects: natural language understanding and natural language generation. The research content includes various levels such as words, phrases, sentences, paragraphs, and chapters. It is a bridge for communication between machine language and human language, aiming to enable machines to understand, interpret, and generate human language, achieve effective communication between humans and machines, and enable computers to perform tasks such as language translation, sentiment analysis, and text summarization.

[0028] Figure 1 It is a schematic diagram of a method for generating a theme color scheme provided by an embodiment of the present disclosure. As Figure 1 shown, the method includes:

[0029] S101, obtaining first color scheme requirement information of the theme.

[0030] In some implementations, the theme can be the page theme of a certain website, interactive interface, or management system. Different themes in different scenarios can improve visual expressiveness and user experience.

[0031] In some implementations, the first color scheme requirement information can be information input by the user according to actual needs and intentions. For example, the user's color matching requirements for different aspects such as style, theme, and atmosphere are used as the first color scheme requirement information. For example, if the user inputs "color matching for a website with a full sense of technology", then the first color scheme requirement information at least includes the keyword "sense of technology" required by the user for the theme.

[0032] In some implementations, the first color scheme requirement information can also be information obtained by extracting the user's operations. For example, if the user selects the "technology style" on the operation page based on a selection operation, the user's intention is determined according to the user's selection operation, so as to obtain the first color scheme requirement information including the user's intention of "technology style".

[0033] S102. Invoke a large model, and the large model outputs a target color value according to the first color matching requirement information.

[0034] In some implementations, the prompt of the large model can be determined, and the first color matching requirement information is concatenated with the prompt and organized into input information for the large model to understand and process. The input information is used as a task requirement and input into the large model, and the large model outputs a target color value based on this input information; in this embodiment, the type of the large model is not limited.

[0035] It can be understood that the target color value is color information corresponding to the first color matching requirement information and can meet the user's requirements for style, theme, and atmosphere. For example, if the first color matching requirement information is "tech style", the target color value can be a color with a more techy feel such as blue or gray. If the first color matching requirement is for children, the target color value can be a more vivid or lively color such as orange or red.

[0036] S103. Determine the target color matching strategy for the theme according to the target color value.

[0037] In some implementations, the target color value can be directly used as the target color matching for the theme; in this embodiment, the target color matching strategy can be a color matching strategy determined by combining factors such as the theme atmosphere. For example, the target color value is used as the target color matching to obtain the target color matching strategy.

[0038] In some implementations, in order to make the colors more rich, the derivative color of the target color value can also be determined. For example, a color similar to the target color value is used as the derivative color, and the target color value and its derivative color are used as the target color matching, thereby determining the target color matching strategy. The target color matching strategy can also include data such as the color ratio of the target color value and its derivative color to achieve a better theme effect.

[0039] In this embodiment, the target color matching strategy can be applied to a certain website, interactive interface, or the page of a management system. In actual application, the corresponding Cascading Style Sheets (CSS) variables can be determined based on the target color matching strategy. CSS variables are a computer language used to add styles (such as fonts, colors, or spacing) to a structured document. Through CSS variables, the layout and appearance of a web page can be controlled, thereby realizing the theme replacement of a website or other pages.

[0040] In this embodiment, by obtaining the user's first color matching requirement information for the theme, calling the large model to perform feature analysis on the first color matching requirement information, obtaining the target color value, and adapting to the user more intelligently and flexibly to obtain a target color value that is more in line with the user's intention. After determining the target color value, a corresponding target color matching strategy is generated based on the target color value, and the target color matching strategy is applied, which greatly improves the degree of automation of color matching. By parsing the natural language description input by the user through the large model, it can better understand and generate a color scheme that meets the user's specific needs, thereby meeting diverse designs and needs.

[0041] Figure 2 FIG. 1 is a schematic diagram of another method for generating a theme color scheme provided by an embodiment of the present disclosure. Figure 2 As shown, the method includes:

[0042] S201, obtaining first color matching requirement information of the theme.

[0043] In the embodiments of the present disclosure, the implementation method of step S201 can be implemented by any of the methods in the embodiments of the present disclosure, which is not limited here and will not be described in detail.

[0044] S202, calling the large model, performing template processing on the first color matching requirement information, and generating prompt words of the large model.

[0045] Optionally, the first color matching requirement information may be subjected to text parsing to obtain color matching related elements and intentions; the color matching related elements and intentions may be subjected to template processing based on a predefined template to obtain prompt words of a large model.

[0046] In this embodiment, the first color matching requirement information is all text information input by the user. For example, if the user inputs "a website color matching with a strong sense of technology", the input content is used as the first color matching requirement information for text parsing, and the color matching related elements and intentions obtained include at least the keyword "sense of technology"; the prompt word can guide the model to generate more accurate and relevant outputs, that is, the large model can generate color values ​​according to the color matching related elements and intentions in the prompt word, so as to generate a target color value that is more in line with the user's intention.

[0047] In some implementations, considering that the user's demand description is relatively vague, predefined templates are added to standardize the user's intention. For example, the user's output "a website color scheme with a strong sense of technology" is converted into "Please generate a color scheme that is high-tech, dominated by blue tones, and suitable for enterprise-level backend management systems." This improves the big model's understanding of the input text and ensures accurate output.

[0048] As an example, a predefined template may include instructions and requirements. For example, based on the color matching related elements and intentions extracted from the first color matching requirement information, the instructions are determined as follows: based on user needs, generate a color value that meets the requirements; the requirements are: 1. The generated color value is expressed in hexadecimal, such as #000000; 2. The color value needs to be closely aligned with user needs and comply with general industry color matching specifications; 3. The saturation of the color value should be controlled between 50% and 95%, and the brightness should be controlled between 50% and 90% to ensure color coordination and usability; 4. The output only returns a hexadecimal color value and does not contain other additional content; the above-mentioned templated prompt words are input into the large model to obtain the target color value, thereby improving the accuracy of the large model output.

[0049] S203, the large model outputs the target color value based on the prompt word.

[0050] It can be understood that the target color value is generated by the large model based on the color matching related elements and intentions of the user in the prompt word, which is more in line with the user's requirements. The target color value can be a hexadecimal color value or other color space channel representation, which will not be elaborated in detail; the target color value is dynamically generated according to the specific needs of the user, and the color matching method is more flexible and personalized.

[0051] S204: Determine a target color matching strategy of the theme according to the target color value.

[0052] In some implementations, before calling the large model, second color matching requirement information of the historical color matching strategy stored in the database may be obtained; and the semantic similarity between the first color matching requirement information and the second color matching requirement information may be obtained.

[0053] The historical color matching strategies stored in the database refer to the color matching strategies historically generated based on user needs. The semantic similarity between the first color matching requirement information and the second color matching requirement information reflects the degree of similarity or proximity between the text of the first color matching requirement information and the text of the second color matching requirement information. The greater the semantic similarity, the more similar the first color matching requirement information is to the second color matching requirement information. Optionally, the calculation of semantic similarity can be obtained based on methods such as bag-of-words model, vector space model or deep learning, which will not be elaborated on in detail.

[0054] In response to the existence of at least one second color matching requirement information whose semantic similarity is greater than or equal to a set threshold, it indicates that there is at least one second color matching requirement information similar to the first color matching requirement information. From the historical color matching strategies corresponding to the at least one second color matching requirement information, select the historical color matching strategy corresponding to the second color matching requirement information with the highest semantic similarity as the target color matching strategy for the theme; that is, select the second color matching requirement information that is most similar to the first color matching requirement information, and use the historical color matching strategy corresponding to the most similar second color matching requirement information as the target color matching strategy for the first color matching requirement, so as to reduce the repeated analysis of the same requirement and improve the color matching generation efficiency.

[0055] In response to the semantic similarity corresponding to the second color matching requirement information being less than or equal to the set threshold, it indicates that there is no second color matching requirement information similar to the current first color matching requirement information. Then, call the large model to generate the target color value, and determine the target color matching strategy for the theme based on the target color value.

[0056] In the embodiments of the present disclosure, the implementation method of step S204 can be implemented in any one of the embodiments of the present disclosure, and no limitation is made here and no further description is given.

[0057] In this embodiment, when calling the large model to obtain the target color value, the first color matching requirement information is processed into a template to obtain the corresponding prompt word, and the prompt word is input into the large model to ensure that the large model can more fully understand the user's color matching related elements and requirements, so that the large model can generate a target color value more in line with the user's intention based on the prompt word, and generate a target color matching strategy more in line with the user's expectations based on the accurate target color value. Before calling the large model, it is also possible to determine whether there is historical color matching requirement information in the database with a high semantic similarity to the current first color matching requirement information. When there is historical color matching requirement information with a semantic similarity greater than or equal to the threshold, use the target color matching strategy of the historical color matching requirement information as the target color matching strategy of the first color matching requirement information, reduce the repeated analysis of similar or identical requirement information, and improve the color matching generation efficiency.

[0058] Figure 3 It is a schematic diagram of another method for generating the theme color matching provided by the embodiments of the present disclosure. As Figure 3 shown, the method includes:

[0059] S301, obtain the first color matching requirement information of the theme.

[0060] In the embodiments of the present disclosure, the implementation method of step S301 can be implemented in any one of the embodiments of the present disclosure, and no limitation is made here and no further description is given.

[0061] S302. Invoke the large model, and the large model outputs the target color value according to the first color matching requirement information.

[0062] In the embodiments of the present disclosure, the implementation method of step S302 can be implemented in any one of the embodiments of the present disclosure, and no limitation is made here and will not be elaborated further.

[0063] S303. Generate at least one auxiliary color value of the theme according to the target color value.

[0064] Optionally, the target color value can be mapped in the HSV color mode to obtain the first HSV parameter corresponding to the target color value, that is, the target color value in other color formats is converted into the HSV color mode, and the first HSV parameter corresponding to the target color value is obtained. The first HSV parameter includes the hue, saturation, and brightness of the target color value. More accurate and rich auxiliary color values are generated based on the first HSV parameter, where H represents hue, S represents saturation, and V represents brightness.

[0065] Optionally, the color mode of the target color value can be determined; based on the color mode of the target color value, the mapping matrix between color modes is determined, and the target color value is mapped in the HSV color mode based on the mapping matrix to obtain the first HSV parameter.

[0066] It can be understood that the large model can generate target color values in different color modes, such as color values in hexadecimal mode or RGB mode. When obtaining the first HSV parameter for the target color value in different color modes, it can be determined based on the specific mapping matrix of the color mode.

[0067] Exemplarily, when the color mode of the target color value is the RGB color mode, the mapping matrix between the RGB color mode and the HSV color mode is determined, so that the target color value in the RGB mode is mapped to the HSV color mode according to the mapping matrix to obtain the first HSV parameter; when the color mode of the target color value is the hexadecimal color value, the mapping matrix between the hexadecimal color value and the HSV color mode is determined, so that the target color value in the hexadecimal mode is mapped to the HSV color mode according to the mapping matrix to obtain the first HSV parameter, so as to ensure that after the large model outputs target color values in different formats, the first HSV parameter of the target color value can be determined.

[0068] Further, at least one second HSV parameter can be determined based on the first HSV parameter; for example, color transformation is performed based on the first HSV parameter, and at least one second HSV parameter is determined through fine adjustment. The second HSV parameter can be the parameter values with similar hue, saturation, or brightness derived from the first HSV parameter.

[0069] Optionally, the control ranges corresponding to each dimension of hue, saturation, and brightness can also be determined according to the first color matching requirement information; for example, the first color matching requirement information includes that "the hue should be controlled between 180° and 260°, the saturation should be controlled between 50% and 95%, and the brightness should be controlled between 60% and 80%", then according to this first color matching requirement information, the control ranges corresponding to the three dimensions of hue, saturation, and brightness can be determined respectively, where the control range of hue is from 180° to 260°, the control range of saturation is from 50% to 95%, and the control range of brightness is from 60% to 80%.

[0070] Furthermore, the values of the second HSV parameter in each dimension are adjusted according to the control range to obtain the third HSV parameter, that is, the hue, saturation, and brightness in the second HSV parameter are adjusted respectively. For example, the second HSV parameter is adjusted by methods such as linear interpolation or ratio adjustment to obtain the adjusted hue, saturation, and brightness, and the adjusted hue, saturation, and brightness all meet the control range in the first color matching requirement information, that is, the hue in the third HSV parameter is between 180° and 260°, the saturation is between 50% and 95%, and the brightness is between 60% and 80%, so as to ensure that the generated auxiliary color value meets the user's needs and improve user satisfaction.

[0071] Furthermore, the third HSV parameter is inversely mapped to obtain the auxiliary color value, and the auxiliary color value and the target color value originally output by the large model are in the same color mode. For example, the large model outputs a 16 - bit color value, the 16 - bit color value is converted to the HSV color mode to obtain the first HSV parameter, the third HSV parameter is obtained based on the first HSV parameter, and the third HSV parameter is inversely mapped to a 16 - bit color value to obtain the auxiliary color value.

[0072] In this embodiment, the auxiliary color value can be color values such as adjacent colors, neutral colors, and functional colors of the target color value. Adjacent colors are colors that have a similar visual effect to the target color value and can create a harmonious and unified color combination. Neutral colors are colors used to balance the overall hue. Functional colors are colors that can be used to express characteristic information, so as to obtain richer auxiliary color values related to the target color value and improve the color matching effect.

[0073] S304. Generate the target color palette of the theme according to the target color value and the auxiliary color value.

[0074] The target color palette of the theme includes at least the target color value and the auxiliary color value of the target color value.

[0075] S305. Generate the target color matching strategy of the theme based on the target color palette.

[0076] Optionally, based on the target color palette, the configuration of Cascading Style Sheets (CSS) variables can be performed, and based on the CSS variables, the target color matching strategy of the theme can be generated, so as to directly apply the theme color matching to a website or a web page. In this embodiment, the CSS variables can be directly used as the target color matching strategy of the theme.

[0077] Exemplarily, the CSS variables can be expressed as:

[0078] :root{

[0079] --colors-brand-1:#001259;

[0080] --colors-brand-2:#001e80;

[0081] --colors-brand-3:#0832a6;

[0082] --colors-brand-4:#144bcc;

[0083] --colors-brand-5:#2468f2;

[0084] --colors-brand-6:#528eff;

[0085] --colors-brand-7:#7dadff;

[0086] --colors-brand-8:#a8caff;

[0087] --colors-brand-9:#d4e5ff;

[0088] }

[0089] In some implementations, after obtaining the target color matching strategy, color matching optimization information of the theme can also be received; the large model optimizes the target color matching strategy of the theme according to the color matching optimization information. For example, when the user is not satisfied with the current target color matching strategy, the color matching optimization information of the theme can be received from the user, and a new prompt word can be generated based on the color matching optimization information. The large model determines the target color value again based on the new prompt word, and further obtains the auxiliary color value based on the target color value, so as to determine the optimized target color matching strategy, making the target color matching strategy more in line with the user's intention.

[0090] In some implementations, the target color matching strategy can also be used as a new historical color matching strategy, and stored in a database after being associated with the first color matching requirement information; that is, the target color matching strategy is stored with the first color matching requirement information, and when the user subsequently inputs the color matching requirement information, it is possible to search in the database whether there is similar historical color matching requirement information based on the input color matching requirement information, thereby directly calling the target color matching strategy of the similar historical color matching requirement information in the database, reducing repeated analysis of the same color matching requirement, improving response speed and reducing the cost of application program interface calls.

[0091] It is understandable that when users use color matching on a web page or website, they can also dynamically switch between different color matching themes through JavaScript, that is, directly switch between different color matching strategies from the cached color matching strategies, and update the theme without refreshing the page, which greatly improves the degree of automation of website color matching.

[0092] In this embodiment, when generating a target color matching strategy based on the target color value, at least one auxiliary color value of the target color value is generated through the control range of HSV parameters and user needs, and richer auxiliary color values ​​related to the target color value are obtained. The target color palette of the theme is generated according to the target color value and the auxiliary color value, and then the CSS variables are configured according to the target color palette to generate the target color matching strategy of the theme, improve the color matching effect of the target color matching strategy, and can also receive the user's color matching optimization information for the theme, optimize the target color matching strategy according to user needs, so that the target color matching strategy is more in line with the user's intention, and store the final generated target color matching strategy in the database as historical color matching requirement information, thereby reducing repeated analysis of subsequent identical color matching requirements, improving response speed and reducing application interface call costs.

[0093] Figure 4 FIG. 1 is a schematic diagram of another method for generating a theme color scheme provided by an embodiment of the present disclosure. Figure 4 As shown, the method includes:

[0094] S401, obtaining first color matching requirement information of the theme.

[0095] In the embodiments of the present disclosure, the implementation method of step S401 may be implemented in any manner in the embodiments of the present disclosure, which is not limited here and will not be described in detail.

[0096] S402, calling the large model, performing template processing on the first color matching requirement information, and generating prompt words of the large model.

[0097] In the embodiments of the present disclosure, the implementation method of step S402 may be implemented in any manner in the embodiments of the present disclosure, which is not limited here and will not be described in detail.

[0098] S403, the large model outputs the target color value based on the prompt word.

[0099] In the embodiments of the present disclosure, the implementation method of step S403 may be implemented in any manner in the embodiments of the present disclosure, which is not limited here and will not be described in detail.

[0100] S404: Generate at least one auxiliary color value of the theme according to the target color value.

[0101] In the embodiments of the present disclosure, the implementation method of step S404 may be implemented in any manner in the embodiments of the present disclosure, which is not limited here and will not be described in detail.

[0102] S405: Generate a target color palette of the theme according to the target color value and the auxiliary color value.

[0103] In the embodiments of the present disclosure, the implementation method of step S405 can be implemented by any of the methods in the embodiments of the present disclosure, which is not limited here and will not be described in detail.

[0104] S406, generating a target color matching strategy of the theme based on the target color palette.

[0105] In the embodiments of the present disclosure, the implementation method of step S406 may be implemented in any manner in the embodiments of the present disclosure, which is not limited here and will not be described in detail.

[0106] In this embodiment, by obtaining the user's first color matching requirement information for the theme, when calling the large model to obtain the target color value, the first color matching requirement information is templated to obtain the corresponding prompt word, and the prompt word is input into the large model to ensure that the large model can more fully understand the user's color matching related factors and needs, so that the large model can generate a target color value that is more in line with the user's intention based on the prompt word, generate at least one auxiliary color value of the target color value through the control range of HSV parameters and user needs, and obtain richer auxiliary color values ​​related to the target color value, and generate the theme's target color palette according to the target color value and the auxiliary color value, and then configure the CSS variables according to the target color palette to generate the theme's target color matching strategy, improve the color matching effect of the target color matching strategy, and improve the degree of automation of color matching. By parsing the natural language description input by the user through the large model, it can better understand and generate a color scheme that meets the user's specific needs and meet diverse designs and needs.

[0107] Figure 5 Schematic diagram of a device for generating a theme color scheme provided by an embodiment of the present disclosure. Figure 5 As shown, the theme color generation device 500 includes:

[0108] An acquisition module 501 is used to acquire first color matching requirement information of a theme;

[0109] A calling module 502 is used to call a large model, and the large model outputs a target color value according to the first color matching requirement information;

[0110] The generating module 503 is used to determine the target color matching strategy of the theme according to the target color value.

[0111] In some implementations, calling module 502 includes:

[0112] The first color matching requirement information is processed into a template to generate a prompt word of a large model;

[0113] The large model outputs the target color value based on the prompt word.

[0114] In some implementations, calling module 502 includes:

[0115] Perform text analysis on the first color matching requirement information to obtain color matching related elements and intentions;

[0116] Based on the predefined template, the color matching related elements and intentions are templated to obtain the prompt words of the large model.

[0117] In some implementations, the generating module 503 includes:

[0118] Generate at least one auxiliary color value of the theme according to the target color value;

[0119] Generate a target color palette of the theme according to the target color value and the auxiliary color value;

[0120] Generate the target color matching strategy of the theme based on the target color palette.

[0121] In some implementations, the generating module 503 includes:

[0122] Based on the target color palette, configure the Cascading Style Sheet CSS variables, and based on the CSS variables, generate the target color matching strategy of the theme.

[0123] In some implementations, the generating module 503 includes:

[0124] Map the target color value to the HSV color mode to obtain the first HSV parameter corresponding to the target color value, where H represents hue, S represents saturation, and V represents brightness;

[0125] Based on the first HSV parameter, a secondary color value is generated.

[0126] In some implementations, the generating module 503 includes:

[0127] Based on the first HSV parameter, determining at least one second HSV parameter;

[0128] According to the first color matching requirement information, determine the control range corresponding to each dimension of hue, saturation and brightness;

[0129] According to the control range, the value of the second HSV parameter in each dimension is adjusted to obtain the third HSV parameter;

[0130] The third HSV parameter is inversely mapped to obtain the auxiliary color value.

[0131] In some implementations, the generating module 503 includes:

[0132] Determine the color mode of the target color value;

[0133] Based on the color mode of the target color value, a mapping matrix between color modes is determined, and based on the mapping matrix, the target color value is mapped to the HSV color mode to obtain a first HSV parameter.

[0134] In some implementations, the generating module 503 further includes:

[0135] Receive theme color optimization information;

[0136] The big model optimizes the target color matching strategy of the theme based on the color matching optimization information.

[0137] In some implementations, calling module 502 includes:

[0138] Acquire the second color matching requirement information of the historical color matching strategy stored in the database;

[0139] Obtaining semantic similarity between the first color matching requirement information and the second color matching requirement information;

[0140] In response to the semantic similarities corresponding to the second color matching requirement information being less than or equal to a set threshold, the large model is called.

[0141] In some implementations, the apparatus 500 further includes:

[0142] In response to the existence of at least one second color matching requirement information having a semantic similarity greater than or equal to a set threshold, the historical color matching strategy corresponding to the second color matching requirement information having the highest semantic similarity is selected from the historical color matching strategies corresponding to the at least one second color matching requirement information as the target color matching strategy of the theme.

[0143] In some implementations, the apparatus 500 further includes:

[0144] The target color matching strategy is used as a new historical color matching strategy, and is associated with the first color matching requirement information and then stored in the database.

[0145] In this embodiment, by obtaining the user's first color matching requirement information for the theme, when calling the large model to obtain the target color value, the first color matching requirement information is templated to obtain the corresponding prompt word, and the prompt word is input into the large model to ensure that the large model can more fully understand the user's color matching related factors and needs, so that the large model can generate a target color value that is more in line with the user's intention based on the prompt word, generate at least one auxiliary color value of the target color value through the control range of HSV parameters and user needs, and obtain richer auxiliary color values ​​related to the target color value, and generate the theme's target color palette according to the target color value and the auxiliary color value, and then configure the CSS variables according to the target color palette to generate the theme's target color matching strategy, improve the color matching effect of the target color matching strategy, and improve the degree of automation of color matching. By parsing the natural language description input by the user through the large model, it can better understand and generate a color scheme that meets the user's specific needs and meet diverse designs and needs.

[0146] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0147] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0148] Figure 6 A schematic block diagram of an electronic device for implementing an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0149] like Figure 6 As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 606 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0150] A number of components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0151] The computing unit 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above, such as the generation method of the theme color. For example, in some embodiments, the generation method of the theme color can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the generation method of the theme color described above can be performed. Alternatively, in other embodiments, the computing unit 601 can be configured to perform the generation method of the theme color by any other appropriate means (e.g., by means of firmware).

[0152] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0153] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0154] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0155] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0156] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0157] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0158] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0159] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for generating a theme color scheme, wherein: The method comprises: Get the first color matching requirement information of the theme; Calling a large model, and having the large model output a target color value according to the first color matching requirement information; According to the target color value, a target color matching strategy of the theme is determined.

2. The method according to claim 1, wherein: The large model outputs a target color value according to the first color matching requirement information, including: Performing template processing on the first color matching requirement information to generate prompt words of the large model; The target color value is output by the large model based on the prompt word.

3. The method according to claim 2, wherein: The step of performing template processing on the color matching requirement information to generate prompt words of the large model includes: Performing text analysis on the first color matching requirement information to obtain color matching related elements and intentions; The color matching related elements and intentions are templated based on a predefined template to obtain prompt words of the large model.

4. The method according to any one of claims 1 to 3, wherein: Determining the target color matching strategy of the theme according to the target color value includes: generating at least one auxiliary color value of the theme according to the target color value; Generate a target color palette of the theme according to the target color value and the auxiliary color value; Based on the target color palette, a target color matching strategy for the theme is generated.

5. The method according to claim 4, wherein: The step of generating a target color matching strategy for the theme based on the target color palette includes: Based on the target color palette, Cascading Style Sheet (CSS) variables are configured, and based on the CSS variables, a target color matching strategy for the theme is generated.

6. The method according to claim 4, wherein: Generating at least one auxiliary color value of the theme according to the target color value includes: Mapping the target color value to the HSV color mode to obtain a first HSV parameter corresponding to the target color value, wherein H represents hue, S represents saturation, and V represents brightness; Based on the first HSV parameter, the auxiliary color value is generated.

7. The method according to claim 6, wherein: The generating the auxiliary color value based on the first HSV parameter includes: Based on the first HSV parameter, determining at least one second HSV parameter; Determine the control range corresponding to each dimension of hue, saturation and brightness according to the first color matching requirement information; According to the control range, the value of the second HSV parameter in each dimension is adjusted to obtain a third HSV parameter; The third HSV parameter is inversely mapped to obtain the auxiliary color value.

8. The method according to claim 6, wherein: The mapping of the target color value to the HSV color mode to obtain a first HSV parameter corresponding to the target color value includes: Determine the color mode of the target color value; Based on the color mode of the target color value, a mapping matrix between color modes is determined, and based on the mapping matrix, the target color value is mapped to the HSV color mode to obtain the first HSV parameter.

9. The method according to any one of claims 1 to 8, wherein: After determining the target color matching strategy of the theme according to the target color value, the method further includes: Receiving color optimization information of the theme; The large model optimizes the target color matching strategy of the theme according to the color matching optimization information.

10. The method according to any one of claims 1 to 8, wherein: The calling of the large model comprises: Acquire the second color matching requirement information of the historical color matching strategy stored in the database; Acquire semantic similarity between the first color matching requirement information and the second color matching requirement information; In response to the semantic similarities corresponding to the second color matching requirement information being less than or equal to a set threshold, the large model is called.

11. The method according to claim 10, wherein: The method further comprises: In response to the existence of at least one second color matching requirement information whose semantic similarity is greater than or equal to the set threshold, the historical color matching strategy corresponding to the second color matching requirement information with the highest semantic similarity is selected from the historical color matching strategies corresponding to the at least one second color matching requirement information as the target color matching strategy for the theme.

12. The method according to claim 10, wherein: After determining the target color matching strategy of the theme according to the target color value, the method further includes: The target color matching strategy is used as a new historical color matching strategy, and is associated with the first color matching requirement information and then stored in the database.

13. A device for generating a theme color scheme, comprising: An acquisition module is used to acquire the first color matching requirement information of the theme; A calling module, used for calling a large model, wherein the large model outputs a target color value according to the first color matching requirement information; A generation module is used to determine a target color matching strategy of the theme according to the target color value.

14. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 12.

15. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-12.

16. A computer program product comprising a computer program, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 12.

Citation Information

Cited By

  • Electronic photo frame interface adjusting method and system based on emotion recognition

    CN120631296A

  • Electronic photo frame interface adjustment method and system based on emotion recognition

    CN120631296B