🤠
cedoscript
  • Introduction
  • Documentation
    • Packets
    • Setting Command
    • Java Imports
    • Examples
      • Creating a Pack
      • Custom Block Animation
      • Bhop
      • Setting Creation
      • Post Notification
      • Gradient Round Rectangle
      • Applying a gradient
      • Simulate a command
  • api
    • Events
    • Settings
    • Objects
      • EntityLivingBase
      • ItemStack
      • Player Abilities
      • Color
      • TimerUtil
      • Continual Animation
      • ShaderUtil
      • FrameBuffer
      • Rainbow
      • Drag
      • Pair
      • Module
  • Bindings
    • Client
    • Player
    • Packet
    • Action
    • Facing
    • Potion
    • Notification
    • Render
    • Stats
    • Font
    • User
    • World
Powered by GitBook
On this page

Was this helpful?

  1. Documentation
  2. Examples

Gradient Round Rectangle

This shows how to create a gradient rounded rectangle from corner to corner

PreviousPost NotificationNextApplying a gradient

Last updated 3 years ago

Was this helpful?

var script = initScript({
   name: "test colors",
   description: "This is the description",    
   author: "cedo"
   })
   
script.onRender2D(function (event) {    
   var colors = client.getClientColors()    
   var middleColor = render.interpolateColors(colors[0], colors[1], 0.5)   
 
   render.drawGradientRoundedRect(300, 300, 100, 100, 6, middleColor, colors[0], colors[1], middleColor)
})
Draws a gradient rounded rectangle with the client colors