Grease molds or line them with parchment.
Combine sugar, corn syrup, and water in saucepan.
Stir over medium heat until sugar fully dissolves.
Attach candy thermometer to the pan.
Allow mixture to reach 300°F (hard crack stage).
Remove from heat and cool slightly for 1 minute.
Quickly add cannabutter and stir well.
Mix in flavoring and coloring if using.
Pour mixture into candy molds carefully.
Let it cool completely, about 30 minutes.
Pop out candies once hardened and cool.
Dust with powdered sugar to prevent sticking.
Store in an airtight container in cool area.