Color Picker - no format prop (for hex values)

1 Answer 9 Views
ColorPicker
Dan
Top achievements
Rank 1
Dan asked on 20 Mar 2024, 05:01 AM | edited on 20 Mar 2024, 05:24 AM
I see here https://www.telerik.com/kendo-vue-ui/colorpicker that the screen shot of the component shows there is a hex value being displayed.

I also see on the jQuery variant there is a parameter which you can pass to show hex instead of RGB. - https://demos.telerik.com/kendo-ui/colorpicker/rgb-hex

On the Vue version the prop for format is non existent. Is there a way to get the hex value to be displayed at all?

on another note is it possible to disable the Alpha slider at all?

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 21 Mar 2024, 06:58 AM

Hi Dan,

Thank you for contacting us.

The Kendo UI for Vue  ColorPicker has multiple input modes and one of them is HEX. The modes can be changed by clicking on the up-down arrows next to the color input in the Gradient view:

Currently, the default input mode is RGB and I have to say that there is no option for changing it.

As for removing the alpha slider, you can set the "gradientSettings" "opacity" property to "false":

      <ColorPicker
        :view="'gradient'"
        :default-value="'green'"
        :gradient-settings="gradientSettings"
      />
    </div>
  </div>
</template>
<script>
import { ColorPicker } from "@progress/kendo-vue-inputs";

export default {
  components: {
    ColorPicker,
  },
  data() {
    return {
      value: "#008000",
      gradientSettings: {
        opacity: false,
      },

Hope this helps.

 

Regards,
Konstantin Dikov
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources

Tags
ColorPicker
Asked by
Dan
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or